Skip to content

Commit 285f869

Browse files
committed
Best practices for release script
1 parent 443e023 commit 285f869

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ permissions: read-all
66
jobs:
77
build:
88
runs-on: ubuntu-latest
9+
environment: GitHub Publish
910
permissions:
1011
contents: read
1112
id-token: write
@@ -15,10 +16,10 @@ jobs:
1516
with:
1617
node-version: "20"
1718
registry-url: 'https://registry.npmjs.org'
19+
- run: npm install -g npm@latest
1820
- run: npm ci
1921
- run: npm test
2022
- if: ${{ github.event.release.tag_name != '' && env.NPM_PUBLISH_TAG != '' }}
2123
run: npm publish --provenance --access=public --tag=${{ env.NPM_PUBLISH_TAG }}
2224
env:
23-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2425
NPM_PUBLISH_TAG: ${{ contains(github.event.release.tag_name, '-beta.') && 'beta' || 'latest' }}

0 commit comments

Comments
 (0)