Skip to content

Commit 1cabcb9

Browse files
committed
feat: publish to npm via OIDC
1 parent 2d17df7 commit 1cabcb9

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 7 additions & 5 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 # Required for OIDC NPM publish
9+
contents: read
10+
711
jobs:
812
release:
913
name: build & publish
@@ -16,11 +20,9 @@ jobs:
1620
node-version: 18
1721
cache: npm
1822
registry-url: https://registry.npmjs.org
23+
package-manager-cache: false # never use caching in release builds
1924

2025
- run: npm ci
21-
- run: npm test
2226
- run: npm run build
23-
24-
- run: npm publish --access public
25-
env:
26-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
27+
- run: npm test
28+
- run: npm publish --access public

0 commit comments

Comments
 (0)