Skip to content

Fix OIDC publish: use Node 24 bundled npm, drop --provenance and corepack install#99

Merged
pcholakov merged 1 commit into
mainfrom
drop-provenance
May 6, 2026
Merged

Fix OIDC publish: use Node 24 bundled npm, drop --provenance and corepack install#99
pcholakov merged 1 commit into
mainfrom
drop-provenance

Conversation

@pcholakov
Copy link
Copy Markdown
Collaborator

@pcholakov pcholakov commented May 6, 2026

Verified working -- triggered the workflow on this branch via workflow_dispatch and a snapshot was published successfully (with provenance auto-attached) to npm via OIDC trusted publishing, no NPM_TOKEN. See run https://github.com/restatedev/cdk/actions/runs/25457317247.

The actual root cause: the corepack install -g npm@latest step installs npm 11.14, which fails OIDC trusted publishing with ENEEDAUTH instead of falling through to the OIDC token exchange. Node 24's bundled npm 10.x (matching what byoc uses) works correctly.

Changes:

  • Bump Node from 22.x to 24 in setup-node
  • Remove the corepack/npm@latest install steps (the "npm 11.5.1+ required" comment was wrong; the bundled npm 10.x works fine for OIDC trusted publishing)
  • Drop --provenance from publish commands (npm auto-attaches provenance via OIDC trusted publishing; this flag is redundant)

Test plan

  • Triggered manually on this branch -- snapshot published successfully via OIDC, provenance attached

@pcholakov pcholakov force-pushed the drop-provenance branch 3 times, most recently from b9c0fbc to 857a70b Compare May 6, 2026 19:46
@pcholakov pcholakov changed the title Drop --provenance flag for OIDC trusted publishing Fix OIDC publish: use Node 24 bundled npm, drop --provenance and corepack install May 6, 2026
@pcholakov pcholakov merged commit 80b7b76 into main May 6, 2026
2 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant