fix(ci): make npm trusted publishing actually work (unblocks npmjs releases)#192
Merged
Conversation
The 'Publish to npm' workflow gates on npm >= 11.5.1 (required for OIDC trusted publishing) but never upgrades npm — Node 22 bundles npm 10.x, so the guard fails and the job exits before publishing. This is why v1.24.0 published to GitHub Packages but not to npmjs.org (and 1.23.3 was last published before this workflow existed). - Upgrade npm to latest after setup-node so the guard passes. - Add a workflow_dispatch (version input) so an already-pushed tag can be re-published to npmjs.org without moving the tag / re-running the GH Packages release. The published tarball excludes .github/, so dispatching from the default branch yields identical package contents to the tag. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Problem
The Publish to npm workflow (
npm-publish.yml) gates onnpm >= 11.5.1(required for OIDC trusted publishing) but never upgrades npm. Node 22 bundles npm10.9.8, so the guard fails and the job exits before publishing.This is why
v1.24.0published to GitHub Packages but not to npmjs.org — the npmjs job failed atError: npm 11.5.1+ required for trusted publishing, got 10.9.8. (1.23.3was last published before this workflow existed, so the workflow had never actually succeeded.)Fix
setup-nodeso the version guard passes.workflow_dispatch(with aversioninput) so an already-pushed tag can be re-published to npmjs.org without moving the tag or re-running the GH-Packages release. The published tarball excludes.github/, so dispatching from the default branch yields package contents identical to the tag.After merge
Run Publish to npm via
workflow_dispatchwithversion=1.24.0to get@openhands/typescript-client@1.24.0(theswitchAcpModelrelease, #189) onto npmjs.org, which is where agent-canvas pins.🤖 Generated with Claude Code