fix(ci): fold release announcement into release.mjs, idempotently - #8
Merged
Merged
Conversation
The old flow gated tag+release on the changesets action's published output, which the action computes by querying the registry after the publish script exits. npm's post-upload validation window can keep the newly accepted version invisible to that query, so the announcement step silently never ran (v0.2.0 needed a manual repair). The announcement now runs inside release.mjs on the publish path and is idempotent per part: publish skipped when registered, tag skipped when present (git ls-remote), release skipped when existing (gh release view). Stranded announcements heal on the next run; scripts/ github-release.mjs and the workflow step are gone.
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.
Root cause of the stranded
v0.2.0announcement: the tag+release step was gated on the changesets action'spublishedoutput, which it computes by querying the registry after the publish script exits. npm's post-upload validation window can keep the newly accepted version invisible to that query, so the step silently never ran — and today'sv0.2.0needed a manual repair (done: release).Fix: announcement moves inside
scripts/release.mjs, on the publish path, and is idempotent per part:vX.Y.Z— skipped whengit ls-remoteshows itgh release viewfinds itConsequences: retries are always safe; a stranded announcement heals on the next run; pushes to main with pending changesets never reach the script (unchanged). Also fixes a latent CHANGELOG-heading matcher bug (required a trailing space after the version; changesets writes
## 0.2.0\\n), caught by an end-to-end test of the exists-path in a disposable clone: publish/tag/release all correctly skip.