chore(NODE-7568): migrate release workflow to npm Trusted Publishing#124
Open
tadjik1 wants to merge 3 commits into
Open
chore(NODE-7568): migrate release workflow to npm Trusted Publishing#124tadjik1 wants to merge 3 commits into
tadjik1 wants to merge 3 commits into
Conversation
Switch the publish step from NPM_TOKEN to OIDC. Since this repo has a single release workflow, release.yml is registered directly as the trusted publisher on npmjs.com — no separate npm-publish.yml needed. - Move id-token: write to job level (least-privilege); release-please job retains contents: write and pull-requests: write it already needed. - Remove NODE_AUTH_TOKEN / NPM_TOKEN; npm publish --provenance uses OIDC.
There was a problem hiding this comment.
Pull request overview
This PR updates the release workflow to publish to npm using Trusted Publishing/OIDC instead of an NPM_TOKEN.
Changes:
- Removes
NODE_AUTH_TOKENfrom thenpm publish --provenance --tag lateststep. - Keeps release publishing gated on
release-pleasecreating a release.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
PavelSafronov
approved these changes
May 21, 2026
Contributor
PavelSafronov
left a comment
There was a problem hiding this comment.
Changes look good. Let's confirm the npm package info has been updated, then we can merge this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summary of Changes
Migrate
mongodb-connection-string-urloffNPM_TOKENand onto npm Trusted Publishing (OIDC) per NODE-7568.Since this repo has a single release workflow,
release.ymlis registered directly as the trusted publisher on npmjs.com — no separatenpm-publish.ymlindirection needed.The only change needed is removing
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}from the publish step —id-token: writewas already present at the workflow level, sonpm publish --provenancecan obtain the OIDC token automatically.Notes for Reviewers
Before merging: An npm Trusted Publishing entry must be configured on npmjs.com for the
mongodb-connection-string-urlpackage, pointing at.github/workflows/release.ymlin this repo. Once verified,NPM_TOKENcan be removed from the repo secrets and the package switched to "Require two-factor authentication and disallow tokens."Double check the following
type(NODE-xxxx)[!]: description