fix: use NPM_TOKEN for npm publish to support new packages#52
Closed
Wenxin-Jiang wants to merge 1 commit intomainfrom
Closed
fix: use NPM_TOKEN for npm publish to support new packages#52Wenxin-Jiang wants to merge 1 commit intomainfrom
Wenxin-Jiang wants to merge 1 commit intomainfrom
Conversation
OIDC trusted publishing requires packages to already exist on the npm registry. Use NPM_TOKEN (automation token) instead, which can create new packages directly — matching how the original workflow worked. - Add `environment: npm-publish` to satisfy zizmor audit - Add `NODE_AUTH_TOKEN` from `secrets.NPM_TOKEN` for publish steps - Add `fail-fast: false` to build matrix to prevent one flaky build from cancelling all others Prerequisites: 1. Create an "npm-publish" environment in repo Settings → Environments 2. Add NPM_TOKEN secret to that environment (automation token from npmjs.com @SocketSecurity org) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
41522e0 to
8ac9ed5
Compare
Contributor
Author
|
No longer needed — placeholder packages created on npm, OIDC should work now. |
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
NPM_TOKENsecret for npm publish steps (viaNODE_AUTH_TOKENenv var)environment: npm-publishto satisfy zizmor'ssecrets-outside-envauditfail-fast: falseto build matrix to prevent transient failures (e.g. docker timeouts) from cancelling all buildsWhy
OIDC trusted publishing requires packages to already exist on the npm registry. The new
-gnu/-muslplatform packages don't exist yet, so OIDC fails withENEEDAUTH. An NPM automation token can create new packages directly.Prerequisites
npm-publishenvironment in repo Settings → EnvironmentsNPM_TOKENsecret to that environment (automation token from npmjs.com@socketsecurityorg)After merging
🤖 Generated with Claude Code