ci: harden release workflow (split npm job + workflow_dispatch, OIDC-ready)#79
Merged
Conversation
…e/OIDC-ready) Decouple npm publishing from GoReleaser so an npm-side failure no longer blocks the GitHub release / Homebrew cask, and so a version can be (re)published independently via workflow_dispatch without re-running GoReleaser (which would conflict with the existing release). Adds id-token: write + --provenance and bumps to npm@latest, making the job OIDC trusted-publishing ready so NPM_TOKEN can eventually be dropped. Removes the risky unpublish-then-publish step.
…OKEN) A configured NODE_AUTH_TOKEN (even empty) makes npm take the token auth path instead of OIDC, so it would fail on token expiry rather than use trusted publishing. Drop the token + registry-url and bump to Node 24 (OIDC needs Node >= 22.14, npm >= 11.5) so npm authenticates via the OIDC id-token against the trusted publisher. NPM_TOKEN is no longer referenced and can be deleted.
Collaborator
Author
|
Updated to pure OIDC trusted publishing (commit 7f39585): dropped |
tcaldwell-x
approved these changes
Jun 29, 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 release workflow ran GoReleaser and the npm publish in a single job, so:
NPM_TOKEN) failed the whole run even though the GitHub release + Homebrew cask succeeded — this is what happened on v1.1.0, v1.1.1, and v1.2.0, and why npm is stuck at 1.0.3 (npm package version is outdated #77);What
goreleaser(binaries + GitHub release + Homebrew cask, tag-push only) andpublish-npm. An npm failure no longer blocks the release/cask.workflow_dispatchtrigger with aversioninput so npm can be (re)published for a given version independently — no GoReleaser re-run. (This is how we'll publish v1.2.0's npm package.)publish-npmgetsid-token: write, bumps tonpm@latest, and publishes with--provenance— making it OIDC trusted-publishing ready. Once a trusted publisher is configured on npmjs.com,NPM_TOKENcan be removed entirely (no more 90-day token rotation).npm unpublish-then-publishstep (npm blocks republishing an unpublished version for 72h).actions/setup-go@v4→v5.After merge
Publish v1.2.0 to npm via: Actions → Release → Run workflow → version
1.2.0(orgh workflow run release.yml --ref main -f version=1.2.0).