Skip to content

Commit 95af448

Browse files
authored
chore: update workflows (#946)
1 parent 3b57f95 commit 95af448

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎.github/workflows/release-please.yml‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
release-please:
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: googleapis/release-please-action@v4
25+
- uses: googleapis/release-please-action@v5
2626
id: release
2727
with:
2828
token: ${{ secrets.GITHUB_TOKEN }}
@@ -47,5 +47,13 @@ jobs:
4747
- run: npm test
4848
if: ${{ steps.release.outputs.release_created }}
4949

50-
- run: npm publish --provenance
50+
- name: Publish to npm
5151
if: ${{ steps.release.outputs.release_created }}
52+
run: |
53+
if [[ "$GITHUB_REF_NAME" == "main" ]]; then
54+
npm publish --provenance
55+
else
56+
npm publish --provenance --tag "v${GITHUB_REF_NAME%%.x}"
57+
fi
58+
env:
59+
NODE_AUTH_TOKEN: ${{ secrets.UUID_NPM_RELEASE_TOKEN }}

0 commit comments

Comments
 (0)