Skip to content

Commit ba9a3ba

Browse files
committed
Best practices for release script
1 parent f662229 commit ba9a3ba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,20 @@ 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
1213
steps:
1314
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
1415
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # 4.0.3
1516
with:
16-
node-version: "20"
17+
node-version: "22"
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' || contains(github.event.release.tag_name, '-alpha.') && 'alpha' || 'latest' }}

0 commit comments

Comments
 (0)