Skip to content

fix(ci): fold release announcement into release.mjs, idempotently - #8

Merged
expilu merged 2 commits into
mainfrom
fix/announcement-into-release
Sep 26, 2026
Merged

expilu merged 2 commits into
mainfrom
fix/announcement-into-release

Conversation

@expilu

@expilu expilu commented Sep 26, 2026

Copy link
Copy Markdown
Owner

Root cause of the stranded v0.2.0 announcement: the tag+release step was gated on the changesets action's published output, 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's v0.2.0 needed a manual repair (done: release).

Fix: announcement moves inside scripts/release.mjs, on the publish path, and is idempotent per part:

  • publish — skipped when the exact version is already registered
  • tag vX.Y.Z — skipped when git ls-remote shows it
  • GitHub release — skipped when gh release view finds it

Consequences: 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.

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.
@expilu
expilu merged commit 2941437 into main Sep 26, 2026
6 checks passed
@expilu
expilu deleted the fix/announcement-into-release branch September 26, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant