-
Notifications
You must be signed in to change notification settings - Fork 8
(ci)Update npm-publish workflow for npmjs.org OIDC/Trusted publishing #1654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,7 @@ on: | |||||
| types: [created] | ||||||
|
|
||||||
| permissions: | ||||||
| id-token: write | ||||||
| contents: read | ||||||
|
|
||||||
| jobs: | ||||||
|
|
@@ -17,6 +18,9 @@ jobs: | |||||
| node-version: 20 | ||||||
| registry-url: "https://registry.npmjs.org" | ||||||
|
|
||||||
| - name: 'Update NPM' # needed for npmjs.org Trusted Publishing | ||||||
| run: npm install -g npm@latest | ||||||
|
||||||
| run: npm install -g npm@latest | |
| run: npm install -g npm@11.5.1 |
Copilot
AI
Apr 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment about defining an env variable is now stale since the env: block with NODE_AUTH_TOKEN was removed. Please update or remove this comment to avoid confusion about how authentication works with Trusted Publishing.
| # define env variable for the specific run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider scoping
id-token: writeto the specific job (or even the publishing step via job-level permissions) instead of workflow-wide permissions. This keeps least-privilege if additional jobs are added later.