Skip to content

ci: harden the release pipeline (stray-tag + empty-bump guards)#26

Merged
UltimaPhoenix merged 1 commit into
mainfrom
ci/release-pipeline-hardening
Jun 25, 2026
Merged

ci: harden the release pipeline (stray-tag + empty-bump guards)#26
UltimaPhoenix merged 1 commit into
mainfrom
ci/release-pipeline-hardening

Conversation

@UltimaPhoenix

Copy link
Copy Markdown
Owner

Hardens the bump job so today's incident can't recur (stray v0.5.0 tag → 0.5.0 skipped → 0.6.0/0.7.0 from rapid re-triggers).

Guards added to bump

  • concurrency: { group: release, cancel-in-progress: false } — re-triggered releases queue instead of racing.
  • Preflight "refuse an empty release" — aborts if there are no non-release commits since the last tag (would have stopped the empty 0.7.0).
  • Tag-exists check — fails fast before committing/pushing if v$NEW already exists, instead of pushing the bump to main and then failing on the tag.
  • git push --atomic — main commit and tag land together or not at all (no "main bumped but tag failed" half-state).
  • fetch-depth: 0 so the preflight can read history + tags.

Not included (deliberately)

Auto-rollback on a publish failure: with the commit-back-to-main design, cleanly reverting would mean reverting a protected-main commit. Instead, after a partial failure a re-run hits the tag-exists guard and aborts loudly — safe by default. The real fix for that class is moving off commit-back-to-main (release-please/changesets), tracked separately.

…bumps

A stray v0.5.0 tag left by a failed run caused a version-skip cascade
(0.5.0 limbo on main, then 0.6.0/0.7.0 from rapid re-triggers). Add four
guards to the bump job:

- concurrency (group: release) so re-triggered releases queue instead of racing
- a preflight that refuses an empty release (no non-release commits since the last tag)
- a tag-exists check that fails fast BEFORE committing, instead of pushing main then
  failing on the tag
- --atomic push so the release commit and tag land together or not at all

fetch-depth: 0 on checkout so the preflight can read history + tags.
@UltimaPhoenix UltimaPhoenix merged commit 1d491d8 into main Jun 25, 2026
9 checks passed
@UltimaPhoenix UltimaPhoenix deleted the ci/release-pipeline-hardening branch June 25, 2026 22:35
@sonarqubecloud

Copy link
Copy Markdown

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