Skip to content

Commit 703bbb8

Browse files
committed
Switch to Trusted Publishing.
1 parent 01feb2d commit 703bbb8

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/package.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131
publish:
3232
needs: check
3333
runs-on: ubuntu-latest
34+
environment: publish
35+
permissions:
36+
id-token: write
3437
if: ${{ github.event.ref == 'refs/heads/develop' || github.event.ref == 'refs/heads/release' }}
3538
steps:
3639
- name: Check out source code
@@ -40,13 +43,14 @@ jobs:
4043
- name: Set up node
4144
uses: actions/setup-node@v4
4245
with:
46+
node-version: '20'
4347
registry-url: 'https://registry.npmjs.org'
48+
- name: Update npm
49+
run: npm install -g npm@latest
4450
- name: Prepare metadata
4551
run: node prepare.mjs
4652
- name: Publish package to NPM
47-
run: npm publish --access public
48-
env:
49-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
53+
run: npm publish --tag latest
5054
release:
5155
needs: check
5256
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)