Skip to content

ci: upgrade npm in publish step — OIDC trusted publishing needs npm >= 11.5#5

Merged
Acro merged 1 commit into
masterfrom
claude/npm-package-review-0xjzp8
Jul 12, 2026
Merged

ci: upgrade npm in publish step — OIDC trusted publishing needs npm >= 11.5#5
Acro merged 1 commit into
masterfrom
claude/npm-package-review-0xjzp8

Conversation

@Acro

@Acro Acro commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Fixes the failed v3.0.0 publish run (#29210915884).

Diagnosis: every gate passed (tag guard, unit + type suite, 500 fuzz scenarios, CJS + ESM tarball smokes — the packed tarball was byte-perfect, 8 files), then npm publish failed with ENEEDAUTH. The runner's Node 22 bundles npm 10.9, which predates npm's OIDC trusted publishing — so if npm is connected via a trusted publisher on npmjs.com, the OIDC token exchange never happens and npm has no credentials at all.

Fix: upgrade npm to latest inside the publish step before npm publish --provenance. With a trusted publisher configured this authenticates via OIDC (no token needed — it takes precedence); a classic NPM_TOKEN Actions secret continues to work as a fallback.

One step changed in .github/workflows/publish.yml; no package code changes. Note: re-running the failed release run would use the old workflow snapshot — after merging, trigger a fresh run instead (workflow_dispatch on the v3.0.0 tag).

🤖 Generated with Claude Code


Generated by Claude Code

… 11.5

The v3.0.0 release run failed at the publish step with ENEEDAUTH: every gate
passed, but Node 22's bundled npm 10.9 predates npm trusted publishing, so
the OIDC exchange never happened. Upgrading npm to latest in the publish step
enables the trusted-publisher flow (no token needed; takes precedence), while
an NPM_TOKEN secret keeps working as a fallback for the classic path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013eq96Mbqa2dBCAN3YCyrDK
@Acro
Acro merged commit 560181c into master Jul 12, 2026
8 checks passed
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.

2 participants