Skip to content

fix: use NPM_TOKEN for npm publish to support new packages#52

Closed
Wenxin-Jiang wants to merge 1 commit intomainfrom
fix/npm-token-for-new-packages
Closed

fix: use NPM_TOKEN for npm publish to support new packages#52
Wenxin-Jiang wants to merge 1 commit intomainfrom
fix/npm-token-for-new-packages

Conversation

@Wenxin-Jiang
Copy link
Copy Markdown
Contributor

Summary

  • Adds NPM_TOKEN secret for npm publish steps (via NODE_AUTH_TOKEN env var)
  • Adds environment: npm-publish to satisfy zizmor's secrets-outside-env audit
  • Adds fail-fast: false to build matrix to prevent transient failures (e.g. docker timeouts) from cancelling all builds

Why

OIDC trusted publishing requires packages to already exist on the npm registry. The new -gnu/-musl platform packages don't exist yet, so OIDC fails with ENEEDAUTH. An NPM automation token can create new packages directly.

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)

After merging

  1. Set up the environment and secret (above)
  2. Re-run the Release workflow
  3. All 14 platform packages + main package should publish successfully

🤖 Generated with Claude Code

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>
@Wenxin-Jiang
Copy link
Copy Markdown
Contributor Author

No longer needed — placeholder packages created on npm, OIDC should work now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant