Skip to content

fix(ci): use Node 24 for npm OIDC trusted publishing#89

Merged
AgentSeal merged 1 commit into
mainfrom
fix/node-24-for-oidc
Apr 18, 2026
Merged

fix(ci): use Node 24 for npm OIDC trusted publishing#89
AgentSeal merged 1 commit into
mainfrom
fix/node-24-for-oidc

Conversation

@AgentSeal

Copy link
Copy Markdown
Collaborator

Summary

First two OIDC test publishes failed due to two compounding issues:

  1. v0.7.4-rc.0: Node 22 ships with npm 10.x, which doesn't know how to exchange GitHub OIDC for a registry token. Registry PUT returned 404.
  2. v0.7.4-rc.1: Added npm install -g npm@latest but hit a known GitHub runner-image bug where Node 22.22.2 ships with a broken npm 10.9.7 missing promise-retry. Self-upgrade crashes before install runs.

Validator report (fresh-session, researched sources):

  • actions/runner-images#13883 documents the bug
  • nodejs/node#62430 is the upstream tracker
  • npm official docs recommend Node 24 for trusted publishing

Fix

Bump node-version from '22' to '24' and delete the upgrade step. Node 24 LTS bundles npm 11.x, which supports OIDC trusted publishing natively. One change, zero workarounds.

Test plan

  • Merge
  • Bump to 0.7.4-rc.2
  • Tag + push, approve deploy
  • Publish succeeds, provenance badge appears on npmjs.com

Node 22 on GitHub's hosted runners currently pins to a broken npm
10.9.7 whose internal `promise-retry` module is missing from the
toolcache (runner-images#13883, nodejs/node#62430). Self-upgrading
via `npm install -g npm@latest` crashes before the install can run,
because `@npmcli/arborist` cannot start without that module.

Node 24 LTS bundles npm 11.x natively, which supports OIDC trusted
publishing out of the box (minimum is 11.5.1, per npm docs). Bumping
the runtime lets us delete the fragile upgrade step entirely.

Test: tag `v0.7.4-rc.2` after merge to validate the flow publishes
successfully with provenance.
@AgentSeal AgentSeal merged commit ec13003 into main Apr 18, 2026
3 checks passed
@AgentSeal AgentSeal deleted the fix/node-24-for-oidc branch April 18, 2026 16:47
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