Skip to content

chore(workflow): upgrade npm CLI for trusted publishing OIDC support#154

Merged
blove merged 1 commit into
mainfrom
chore/upgrade-npm-cli-for-trusted-publishing
May 1, 2026
Merged

chore(workflow): upgrade npm CLI for trusted publishing OIDC support#154
blove merged 1 commit into
mainfrom
chore/upgrade-npm-cli-for-trusted-publishing

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 1, 2026

Fixes the v0.0.2 publish workflow failure (run 25223696213).

Root cause

actions/setup-node@v6.3.0 with node-version: 22 ships npm 10.9.2, which has partial OIDC code paths (enough to print error retrieving identity token) but doesn't fully implement the trusted-publishing flow against npm registry's OIDC endpoint.

npm 11.5.1+ is required for trusted publishing per npm docs.

Failure pattern observed

  • @ngaf/a2ui: 404 Not Found - PUT https://registry.npmjs.org/@ngaf%2fa2ui
  • @ngaf/licensing, @ngaf/partial-json: error retrieving identity token
  • Other 4 packages didn't attempt (nx-bail stopped on first failures)

All 7 packages have correct trusted-publisher configs on npmjs.com (verified manually); failure is npm CLI version, not config.

Fix

Adds npm install -g npm@latest between npm ci and the publish step.

Next step after merge

Re-run the existing v0.0.2 publish workflow:

gh run rerun 25223696213

Sources

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel Bot commented May 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment May 1, 2026 5:19pm
cacheplane-minting-service Error Error May 1, 2026 5:19pm

Request Review

The 0.0.2 publish workflow run failed with 'error retrieving identity
token' on @ngaf/licensing and @ngaf/partial-json, and a 404 on
@ngaf/a2ui. Root cause: actions/setup-node@v6.3.0 with node-version: 22
ships npm 10.9.x, which has partial OIDC code paths but doesn't fully
implement the trusted-publishing flow against npm registry's OIDC
endpoint.

Node 22 LTS will never ship npm 11+ (locked); Node 24 ships npm 11.6+
out of the box (verified via nodejs.org/dist/index.json).

Bump only the publish workflow's Node version. The rest of CI
(lint/test/build/e2e) stays on Node 22 — the publish workflow doesn't
share artifacts with those, so the version drift is harmless.

Sources:
- https://philna.sh/blog/2026/01/28/trusted-publishing-npm/
- npm/cli#8730
- https://docs.npmjs.com/trusted-publishers/

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@blove blove force-pushed the chore/upgrade-npm-cli-for-trusted-publishing branch from 614cfd6 to a109470 Compare May 1, 2026 17:17
@blove blove merged commit e9ebb5f into main May 1, 2026
14 of 15 checks passed
@blove blove deleted the chore/upgrade-npm-cli-for-trusted-publishing branch May 7, 2026 16:30
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