chore: switch npm publish from token to OIDC trusted publishers#107
Merged
chore: switch npm publish from token to OIDC trusted publishers#107
Conversation
- Add id-token:write permission for npm OIDC - Ensure npm >= 11.5.1 (required for OIDC trusted publishing) - Remove NPM_TOKEN / NODE_AUTH_TOKEN secrets from goreleaser step GitHub is already configured as a trusted publisher on npmjs.com. GoReleaser's npm pipe will use the OIDC token automatically. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
@onkernel/clinpm publishing fromNPM_TOKENsecret to OIDC trusted publishersChanges to
.github/workflows/release.yamlid-token: writepermissionnpm install -g npm@lateststepNPM_TOKENandNODE_AUTH_TOKENenv vars from GoReleaser stepPrerequisites
@onkernel/clion npmjs.com (docs)Test plan
@onkernel/clito npm successfullyNPM_TOKENsecret from the repo settingsNote
Medium Risk
Changes release/publishing authentication; failures could block npm releases if OIDC/npm configuration isn’t correct.
Overview
Switches the release workflow to publish to npm via OIDC trusted publishing instead of an
NPM_TOKENsecret.The workflow now grants
id-token: write, updates npm to a version that supports OIDC, and removesNPM_TOKEN/NODE_AUTH_TOKENfrom the GoReleaser environment so publishing relies on the minted OIDC token.Written by Cursor Bugbot for commit 72531b1. This will update automatically on new commits. Configure here.