Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR updates the release workflow to implement OIDC-based authentication for npm publishing (trusted publishing) instead of using a token-based approach. The changes aim to improve security by removing the need for storing an NPM_TOKEN secret.
Changes:
- Install latest npm version to meet trusted publishing requirements (minimum npm 11.5.1)
- Remove NPM_TOKEN secret usage and set it to empty string to enable OIDC authentication
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Use OIDC for npm authentication instead of NPM_TOKEN | ||
| NPM_TOKEN: "" # https://github.com/changesets/changesets/issues/1152#issuecomment-3190884868 |
There was a problem hiding this comment.
This implementation is incomplete for OIDC-based npm publishing. The workflow is missing the required id-token: write permission in the permissions section (lines 14-16). Without this permission, the GitHub Actions workflow cannot request an OIDC token, and npm publishing will fail.
Additionally, you may need to configure provenance settings. Consider adding an .npmrc file or updating package.json publishConfig with provenance: true to enable npm provenance, which generates signed attestations of where and how the package was built.
|
|
||
| # npm 11.5.1 or later is required for trusted publishing | ||
| - name: Update npm | ||
| run: npm install -g npm@latest |
There was a problem hiding this comment.
The comment mentions npm version 11.5.1 as the requirement, but the installation command uses npm@latest. This could potentially install a future version with breaking changes or regressions. Consider pinning to a specific minimum version that's known to work (e.g., npm@11.5.1 or npm@^11.5.1) to ensure reproducible builds and avoid unexpected issues from future npm releases.
| run: npm install -g npm@latest | |
| run: npm install -g npm@11.5.1 |
This pull request updates the release workflow to improve npm publishing security and compatibility. The main changes are updating npm to the latest version and switching to OIDC-based authentication for npm publishing.
Release workflow improvements:
NPM_TOKEN, following best practices for secure publishing.