Skip to content

Commit

Permalink
add tag to npm publication
Browse files Browse the repository at this point in the history
Signed-off-by: Allain Magyar <allain.magyar@iohk.io>
  • Loading branch information
amagyar-iohk committed Feb 18, 2025
1 parent d2462e7 commit b5d80e2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
1 change: 0 additions & 1 deletion .github/workflows/release-clients.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "lts/*"
token: ${{ secrets.NPM_TOKEN }}

- name: Setup Gradle
uses: gradle/gradle-build-action@v2.8.0
Expand Down
23 changes: 18 additions & 5 deletions cloud-agent/client/generator/publish-clients.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,23 @@ echo version=${AGENT_VERSION}
# install dependencies
yarn

gradle -p ../kotlin -Pversion=${AGENT_VERSION} publish
# Determine if the version is a snapshot or a release
if [[ "$AGENT_VERSION" == *-* ]]; then
echo "Publishing snapshot version"

# typescript
yarn --cwd ../typescript
yarn --cwd ../typescript publish --new-version ${AGENT_VERSION} --no-git-tag-version --non-interactive --access public
# kotlin
gradle -p ../kotlin -Pversion=${AGENT_VERSION} publish

# python
# typescript
yarn --cwd ../typescript
yarn --cwd ../typescript publish --new-version ${AGENT_VERSION} --no-git-tag-version --non-interactive --access public --tag snapshot
else
echo "Publishing release version"

# kotlin
gradle -p ../kotlin -Pversion=${AGENT_VERSION} publish closeAndReleaseSonatypeStagingRepository

# typescript
yarn --cwd ../typescript
yarn --cwd ../typescript publish --new-version ${AGENT_VERSION} --no-git-tag-version --non-interactive --access public
fi

0 comments on commit b5d80e2

Please sign in to comment.