ci: fix OIDC npm publish (npm >= 11.5.1); run CI on PRs only#124
Merged
Conversation
d9586e4 to
2508be5
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2508be5. Configure here.
release.yaml: install npm 11 (pinned to the major, latest 11.x) before publishing in the release and beta jobs. Node 22 bundles npm ~10.9, which signs provenance but cannot authenticate `npm publish` via OIDC trusted publishing (added in npm 11.5.1) — the first changesets release failed with E404. Old semantic-release worked because @semantic-release/npm did its own OIDC token exchange. ci.yaml: run on pull_request to main only (drop the push trigger and the next branch); release.yaml now covers push-to-main integration. Assisted-by: Claude Opus 4.8 via Claude Code Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2508be5 to
b3da070
Compare
garrensmith
approved these changes
Jul 3, 2026
himank
approved these changes
Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Fixes the npm publish failure on the first Changesets release, and trims CI triggers.
The publish bug
The
3.4.0release job failed with:…even though provenance was signed just before. Root cause:
changeset publishshells out tonpm publish, and the runner (node 22) bundles npm ~10.9. npm can sign provenance since 9.5, but OIDC trusted publishing — authenticatingnpm publishwith no token — requires npm ≥ 11.5.1. So the publish request was effectively unauthenticated and the registry returned a 404 for the scoped package.@semantic-release/npmworked before because it runs its own OIDC token exchange, independent of the npm CLI version.Fix:
npm install -g npm@latestbefore publishing, in both thereleaseandbetajobs.CI trigger change
ci.yamlnow runs onpull_request→mainonly (drops thepushtrigger and thenextbranch).release.yamlalready runs the integration suite on push tomain(gated to the publish push), so this removes the duplicate run.🤖 Generated with Claude Code
Note
Medium Risk
Publish path changes affect production npm releases; CI no longer runs on every push, and
ci.yamlintegration may only run via manual dispatch unless release gating covers it.Overview
Release publishing now runs
npm install -g npm@11in the stablereleaseand manualbetajobs beforechangeset publish, sonpm publishcan use OIDC trusted publishing (npm ≥ 11.5.1). Node 22’s bundled npm ~10.9 could sign provenance but not authenticate the publish, which led to failed scoped-package publishes.CI triggers in
ci.yamlare narrowed topull_requestagainstmain(plusworkflow_dispatch);pushand thenextbranch are removed. Quote style for Node 22 is normalized to double quotes.Note: the
integrationjob inci.yamlstill only runs onpushorworkflow_dispatch, so it no longer runs on ordinary PRs—integration coverage on merge-to-main is expected via the pre-publish gate inrelease.yamlwhen there are no pending changesets.Reviewed by Cursor Bugbot for commit b3da070. Bugbot is set up for automated code reviews on this repo. Configure here.