Skip to content

Commit 1f24fed

Browse files
committed
use oidc auth for npm release
1 parent d7269cc commit 1f24fed

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/npm-publish.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
release:
55
types: [published]
66

7+
permissions:
8+
id-token: write
9+
contents: read
10+
711
jobs:
812
publish:
913
runs-on: ubuntu-latest
@@ -13,8 +17,7 @@ jobs:
1317
with:
1418
node-version: 20
1519
registry-url: "https://registry.npmjs.org"
20+
- run: npm update -g npm@latest
1621
- run: npm ci
1722
- run: npm run test
1823
- run: npm publish --access=public
19-
env:
20-
NODE_AUTH_TOKEN: ${{secrets.NPM_RELEASE_TOKEN}}

0 commit comments

Comments
 (0)