chore(npm): Update release npm action to stop using tokens#526
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR modernizes the CI/CD workflows by updating Node.js versions, pinning GitHub Actions to specific commit SHAs for security, and transitioning to a more secure npm authentication method using OIDC.
Key changes:
- Upgraded Node.js from version 18 to version 20 across both workflows
- Pinned GitHub Actions to commit SHAs with version tags for immutability and security
- Refactored npm authentication from
.npmrctoken approach toregistry-urlconfiguration with OIDC permissions
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/ci.yml |
Updated Node version to 20.x, pinned actions to commit SHAs, and added emoji labels to workflow steps |
.github/workflows/cd.yml |
Updated Node version to 20, added OIDC permissions block, replaced manual npm token setup with registry-url configuration, and added emoji labels to workflow steps |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What is the current behavior?
NPM_TOKEN, so it cannot use npm’s trusted-publisher (OIDC) flow.GitHub Issue Number: N/A
What is the new behavior?
id-token: write, configuresactions/setup-node@v6with the npm registry, upgrades npm, and runsnpm run publish:ciwithout writing.npmrc, so publishing uses the short-lived OIDC credential.actions/checkoutandactions/setup-nodeto the most recent versions.Does this introduce a breaking change?
Testing
Other information