Skip to content

fix(release): restore npm upgrade for OIDC trusted publishing#41

Merged
sdserranog merged 2 commits into
mainfrom
fix/gateway-setup-new-route
Jul 7, 2026
Merged

fix(release): restore npm upgrade for OIDC trusted publishing#41
sdserranog merged 2 commits into
mainfrom
fix/gateway-setup-new-route

Conversation

@sdserranog

Copy link
Copy Markdown
Contributor

Problem

Publishing @arcadeai/create-agent to npm has been failing with a 404:

npm error 404 Not Found - PUT https://registry.npmjs.org/@arcadeai%2fcreate-agent

The registry is stuck at 0.5.5; 0.5.6 and 0.5.7 both failed to publish.

Root cause

The package publishes via npm OIDC Trusted Publishing (no token in the workflow). The Trusted Publisher config on npm is correct, and the GitHub OIDC identity matches (repo:ArcadeAI/create-arcade-agent:environment:npm, release.yml@refs/heads/main) — provenance signing succeeds.

But OIDC trusted-publishing registry auth requires npm ≥ 11.5.1, and setup-node with node-version: 22 installs npm 10.x. npm 10.x can sign provenance (Fulcio, since npm 9.5) but cannot authenticate to the registry via OIDC — so it falls back to an empty token and 404s.

PR #33 removed npm install -g npm@latest as "redundant." It was load-bearing. History confirms it: versions published fine under #25 (npm upgrade present); the first CI release after #33 (0.5.6) failed.

Changes

  • Restore npm install -g npm@latest before publish so npm can do the OIDC exchange.
  • Add workflow_dispatch so this can be triggered manually — needed here because 0.5.7's package.json bump already merged to main, so the paths: [package.json] trigger won't fire again.

After merge

Run the Release workflow manually (Actions → Release → Run workflow on main). The "Check if version changed" step compares local 0.5.7 against the registry's 0.5.5 and will publish 0.5.7.

Node 22 ships npm 10.x, which can sign provenance but cannot perform the
OIDC trusted-publishing registry auth added in npm 11.5.1. Without it,
publish falls back to an empty token and 404s. #33 removed this step as
'redundant' — it was load-bearing. Restore it.
Lets a maintainer publish a version whose package.json bump already merged
but whose triggered release run failed (e.g. 0.5.7). The version-changed
check still guards against republishing.
@sdserranog
sdserranog requested a review from teallarson July 7, 2026 17:00
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