Repository navigation
ci(release): publish npm from release.yml, not publish-npm.yml - #1483
Closed
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
Closed
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
Conversation
Every socket-patch npm package's trusted publisher is registered against release.yml, and npm allows only one publisher per package. The 5.0.0 release dispatched publish-npm.yml, whose OIDC token named that file, so npm rejected it with E401 before staging anything. Move the npm leg back inline as release.yml's npm-publish job (same steps as publish-npm.yml) and delete publish-npm.yml, so the existing registration keeps working. Add an `npm-retry-version` input that skips the version gate, build, tag, GitHub release and crates.io jobs and re-stages npm from an existing release's assets; this retries 5.0.0 now and replaces the manual Publish npm dispatch. crates.io stays dispatched through publish-cargo.yml, since crates.io allows several publishers per crate. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Mikola Lysenko (mikolalysenko)
enabled auto-merge
October 13, 2026 13:37
Tanmay Singla (Tanmay182003)
approved these changes
Oct 13, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 13, 2026
Collaborator
Author
|
Final reviewer: re-enqueued once. The merge group's Generated by Claude Code |
Merged
Collaborator
Author
|
Superseded by #1485, the combined 5.0.1 release PR, which cherry-picks this commit. 5.0.0 won't be retried on npm; 5.0.1 ships with this fix. |
github-merge-queue
Bot
removed this pull request from the merge queue due to a manual request
Oct 13, 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.
Why
The 5.0.0 release's npm leg failed with
E401 Unable to authenticate(run 38311868646). Every npm package's trusted publisher is registered againstrelease.yml, but the leg ran aspublish-npm.yml. npm allows only one publisher per package and matches the top-level workflow filename. Nothing was staged.What
release.yml'snpm-publishjob, with the same steps aspublish-npm.yml: asset download +SHA256SUMScheck (digest-pinned on a full run), stage platform packages, then the main package, then the approval summary. It hasid-token: writeand a per-version concurrency group.publish-npm.ymlis deleted.npm-retry-versioninput on Release. It skips the version gate, build, tag, GitHub release and crates.io jobs and re-stages npm from the existingv<version>release, with an integrity-onlySHA256SUMScheck. It still runs asrelease.yml, so no trusted-publisher change is needed.publish-cargo.yml(its publisher is being added for both crates).docs/releasing.md, therelease.ymlheader, thedispatch-publish.shcomments and oneci.ymlcomment are updated to match.After merge
Retry 5.0.0's npm publish: Actions → Release → Run workflow on
mainwithnpm-retry-version: 5.0.0, then approve the staged packages with 2FA, platform packages first.actionlintonrelease.ymlandshellcheckondispatch-publish.shpass.🤖 Generated with Claude Code
Note
Medium Risk
Changes the release pipeline and npm OIDC workflow identity; mistakes could block or mis-stage npm publishes, but behavior mirrors the deleted workflow and includes retry/idempotency guards.
Overview
Moves npm publishing back into
release.ymlso OIDC trusted publishing matches npm’s single publisher per package (registered onrelease.yml, not a separate workflow). The standalonepublish-npm.ymlis removed; its steps now run in the inlinenpm-publishjob (release asset download,SHA256SUMSpinning on full releases, stage platform + main packages, approval summary), withid-token: writeand per-version concurrency.Adds
npm-retry-versionon Release to skip build/tag/GitHub release/crates.io and re-stage npm from an existingv<version>release (integrity-only checksum on retry). crates.io is unchanged—still dispatched viapublish-cargo.yml. Docs (releasing.md), workflow headers,dispatch-publish.shcomments, and a CI comment are updated accordingly.Reviewed by Cursor Bugbot for commit b8ccf1f. Configure here.