Skip to content

Commit 9afb0ef

Browse files
ci(publish): use npm trusted publishers with OIDC (#99)
## Summary - Add OIDC permissions (`id-token: write`) for npm trusted publishers - Update Node.js to version 22 - Remove `NODE_AUTH_TOKEN` secret (no longer needed with trusted publishing) <!-- Reviewable:start --> - - - This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/m-lab/ndt7-js/99) <!-- Reviewable:end -->
1 parent 58ffec8 commit 9afb0ef

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/publish.yml

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

7+
permissions:
8+
id-token: write
9+
contents: read
10+
711
jobs:
812
publish:
913
runs-on: ubuntu-latest
@@ -15,7 +19,7 @@ jobs:
1519
- name: Setup Node.js
1620
uses: actions/setup-node@v6
1721
with:
18-
node-version: 20
22+
node-version: 22
1923
cache: 'npm'
2024
registry-url: 'https://registry.npmjs.org'
2125

@@ -30,5 +34,3 @@ jobs:
3034

3135
- name: Publish to npm
3236
run: npm publish --access public
33-
env:
34-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)