fix(ci): CI-safe npm publish on release#57
Merged
Conversation
…targets release.yml called `make publish-rc`/`make publish`, which prompt for confirmation and re-run commit/tag/push — fine for a human running the whole release locally, but they cancel in CI (no TTY), so tag-triggered releases never published. Publish directly, routing -rc./-beta. tags to the matching npm dist-tag (never latest). NOTE: also requires the NPM_TOKEN repo secret to be set (currently unset — see PR description).
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.
The release workflow could never auto-publish: it called
make publish-rc/make publish, which are interactive (aread -p "Continue? (y/N)"prompt) and also re-do commit/tag/push. In CI there's no TTY, so the prompt defaults to No and the publish is cancelled (this is why thev2.2.0-rc.0release run failed). This publishes directly, routing-rc./-beta.tags to therc/betadist-tag so a prerelease never lands onlatest.Second, separate blocker (needs a repo admin — I can't do it): the
NPM_TOKENsecret is not set in this repo. Thev2.2.0-rc.0release run showedNODE_AUTH_TOKEN:blank (the authorizer-js repo has it and published fine). SetNPM_TOKENin repo Settings → Secrets, then re-run the release for tagv2.2.0-rc.0(or re-push the tag) and it will publish 2.2.0-rc.0 to thercdist-tag.Interim: a maintainer can publish now with
npm ci && npm run build && npm publish --tag rc --access publiclocally (version + tag are already on main).