Skip to content

fix(release): restore npm@latest upgrade for tokenless OIDC publish#305

Merged
garrity-miepub merged 1 commit into
mainfrom
fix/release-npm-oidc-upgrade
Jul 9, 2026
Merged

fix(release): restore npm@latest upgrade for tokenless OIDC publish#305
garrity-miepub merged 1 commit into
mainfrom
fix/release-npm-oidc-upgrade

Conversation

@garrity-miepub

Copy link
Copy Markdown
Collaborator

Problem

Follow-up to #304. That PR fixed the install-time failure (npm 12 won't install on Node 20 → bumped to Node 22) but I also removed the Upgrade npm step, assuming it was dead weight. It wasn't.

Release run #162 (first run on the Node 22 config) got all the way to Publish to npm and failed there. @next is still stuck at 0.6.1-dev.159.

Root cause:

  • The publish step has no NODE_AUTH_TOKEN and the job sets id-token: write, so it publishes via tokenless npm OIDC Trusted Publishing.
  • Tokenless trusted publishing requires npm >= 11.5.1.
  • Node 22 ships npm 10.9, which supports --provenance but not tokenless trusted publishing → auth failure.
  • Run fix(build): externalize datavis deps in tsup config #159 only succeeded because its (now-removed) Upgrade npm step pulled npm 11.x.

Fix

Re-add the Upgrade npm step. The correct config needs both changes together:

Node npm Installs? Tokenless OIDC publish?
Original (#160/#161) 20 upgrade→12 ❌ npm 12 needs Node ≥22
#304 (run #162) 22 bundled 10.9 ❌ needs npm ≥11.5.1
This PR 22 upgrade→12

npm 12 installs cleanly on Node 22 and restores OIDC auth; Node 22 is still required because npm 12 dropped Node 20.

Scope / risk

  • CI-only — one file, .github/workflows/release.yml. No src/, deps, build config, or exports. Cannot regress any consuming app.

After merge

Merging to main triggers the Release workflow; the publish step should now authenticate via OIDC and push 0.6.1-dev.163+ to @next.

Run #162 reached 'Publish to npm' then failed: the step uses tokenless
OIDC Trusted Publishing (no NODE_AUTH_TOKEN; id-token: write set), which
requires npm >= 11.5.1. Node 22 ships npm 10.9, which supports --provenance
but NOT tokenless trusted publishing.

Re-add the 'Upgrade npm' step (removed in the prior fix). npm@latest (v12)
installs fine on Node 22 and restores OIDC auth. Node 22 is still required
because npm 12 dropped Node 20. Both changes are needed together.
Copilot AI review requested due to automatic review settings July 9, 2026 01:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Restores the npm@latest upgrade step in the Release GitHub Actions workflow so that npm publish --provenance can authenticate via tokenless OIDC Trusted Publishing on Node 22 (where the bundled npm is too old for this auth mode).

Changes:

  • Clarifies the Node 22 rationale in actions/setup-node configuration comments.
  • Re-adds an Upgrade npm step (npm install -g npm@latest) and a follow-up version print to ensure the publish step runs with a sufficiently new npm.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: d271069
Status: ✅  Deploy successful!
Preview URL: https://b5012846.ui-6d0.pages.dev
Branch Preview URL: https://fix-release-npm-oidc-upgrade.ui-6d0.pages.dev

View logs

@garrity-miepub garrity-miepub merged commit ecc87ff into main Jul 9, 2026
11 checks passed
@garrity-miepub garrity-miepub deleted the fix/release-npm-oidc-upgrade branch July 9, 2026 01:45
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