Skip to content

ci: migrate to push-based release flow - #792

Merged
fiunchinho merged 4 commits into
mainfrom
migrate-to-push-based-release
Jun 3, 2026
Merged

ci: migrate to push-based release flow#792
fiunchinho merged 4 commits into
mainfrom
migrate-to-push-based-release

Conversation

@fiunchinho

Copy link
Copy Markdown
Member

Summary

Replaces the existing release setup with the push-based auto-release flow validated end-to-end in giantswarm/test-release-please. Mirrors the migration shape from klausctl PR #258.

muster had the heaviest old setup: release-please + the colleague's goreleaser-based auto-release + two goreleaser configs (.goreleaser.yaml + .goreleaser.ci.yaml). All three are removed.

What changes

Removed:

  • All workflows from the old release setup (see file list in the diff)
  • Any goreleaser configs the colleague's PoC was using

Added:

  • .github/workflows/auto-release.yaml — single workflow that runs on push to main (and release-* branches for backports). git-cliff computes the next version from conventional commits since the last reachable tag, then gh release create atomically creates the tag and the GitHub Release with cliff-rendered notes.
  • cliff.toml — bump rules, Keep-a-Changelog section mapping (Added/Fixed/Changed/Security), [remote.github] integration for PR-link + author rendering, (?m) \\(#N\\)$ preprocessor to dedupe the squash-merge suffix, --unreleased --bump flag combo so the release notes contain only the bumped release.

Kept:

  • CHANGELOG.md — historical reference; future releases publish notes only to GitHub Releases.

CircleCI

CircleCI is unchanged — muster's pipeline already includes architect/upload-release-assets for the muster binary.

Expected behavior after merge

The merge commit's conventional type (ci:) doesn't trigger a bump in git-cliff's default — ci maps to "Changed" but only feat / fix / breaking actually bump. So this PR likely produces no release on its own. The next conventional fix: or feat: lands as the first release under the new flow.

Related

Replaces all the existing release-related workflows / configs with the
push-based auto-release flow validated end-to-end in
giantswarm/test-release-please.

Removed: release-please workflow/config/manifest, .goreleaser.yaml, .goreleaser.ci.yaml, and the colleague-PoC auto-release.yaml.

Added:
  - .github/workflows/auto-release.yaml  (single workflow: git-cliff
    decides bump, creates tag + GitHub Release atomically via
    'gh release create')
  - cliff.toml  (Keep-a-Changelog sections, PR-link + author rendering
    via [remote.github] integration, '(?m) (#N)$' preprocessor for
    squash-merge suffixes, Full Changelog footer, --unreleased --bump
    flag combo to filter to the bumped release only)

CHANGELOG.md left alone — historical reference; future releases publish
notes only to the GitHub Releases page.

CircleCI unchanged: it already had architect/upload-release-assets for the muster binary.
@fiunchinho fiunchinho self-assigned this Jun 3, 2026
@fiunchinho
fiunchinho marked this pull request as ready for review June 3, 2026 14:34
@fiunchinho
fiunchinho requested a review from a team as a code owner June 3, 2026 14:34
Two issues surfaced when this PR hit muster's CI:

1. Makefile.custom.mk referenced the now-deleted .goreleaser.yaml /
   .goreleaser.ci.yaml in three release-* targets and the lint-yaml
   target. The release-* targets (release-dry-run, release-dry-run-fast,
   release-local) are dead with goreleaser gone; remove them entirely.
   Also drop the test-auto-release target (act-based simulation of the
   old goreleaser auto-release.yaml shape — doesn't apply to the new
   workflow). Trim the lint-yaml file list to just the surviving
   workflow YAMLs.

2. auto-release.yaml line 62 (the git-cliff download_url) was 143 chars,
   over muster's 120-char yamllint limit (vs. test-release-please's 200).
   Add `# yamllint disable-line rule:line-length` immediately above it —
   URLs don't have natural break points and this is the standard escape
   hatch.

Also tidied a small comment-indentation warning in the same file: the
trailing comment on `pull-requests: read` had a wrapped second line that
yamllint flagged as misaligned. Restructured the comment block so the
explanation sits above the permission line instead of trailing it.

Verified locally with the same yamllint config muster's CI uses
(.yamllint, line-length max 120) — both files lint clean.
ci.yaml still installed goreleaser and ran `make release-dry-run-fast`
on PRs as a "release smoke test". With goreleaser gone, both the
target and the test no longer apply. Drop the two steps.

Also removed the now-stale "Release" section from CLAUDE.md's
make-targets list — referenced the deleted release-dry-run-fast
target and would mislead anyone reading the docs.

@teemow teemow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the push-based migration end-to-end. Clean, well-documented change — the inline rationale (--unreleased --bump vs --latest --bump, atomic tag+release via gh release create, lightweight-tag trade-off, per-branch concurrency, git describe reachable-baseline for backports) is excellent.

The earlier Lint and Test failure (stale .goreleaser references in Makefile.custom.mk + the over-length download_url line) is resolved in the latest commit — lint is green and yamllint passes locally.

One non-blocking nit for a follow-up: in the no-bump / re-run case git-cliff --unreleased --bump --context can yield an empty array, and jq -r '.[0].version' then emits the literal null, which slips past the [ -z ] / [ = last ] skip guard and would attempt gh release create null. jq -r '.[0].version // empty' is cheap insurance. Not a blocker if you've confirmed git-cliff returns the current version (not []) on a no-bump push.

From teemow's review of muster#792. If git-cliff ever returns an
empty array (no unreleased commits / no bumpable commits) the current
`jq -r '.[0].version'` would output the literal "null", slipping
past the [ -z ] / [ = last ] skip guards and attempting
`gh release create null`. `// empty` makes jq output nothing
instead, which [ -z ] catches.

Mirrored from giantswarm/test-release-please#17.
@fiunchinho

fiunchinho commented Jun 3, 2026

Copy link
Copy Markdown
Member Author

Thanks for catching this! Applied the // empty guard. I couldn't empirically provoke the empty-array case locally (git-cliff returned [{version: …}] for every scenario I tried — HEAD at latest tag, HEAD at root commit, chore-only / style-only / non-conventional unreleased commits) — but the fix is cheap insurance and your point about it slipping past both skip-guards is sound.

Also propagated the same fix to:

So when the migration wave rolls, every consuming repo gets the defensive guard from day one.

@fiunchinho
fiunchinho enabled auto-merge (squash) June 3, 2026 14:52
@fiunchinho
fiunchinho merged commit 471736b into main Jun 3, 2026
5 of 7 checks passed
@fiunchinho
fiunchinho deleted the migrate-to-push-based-release branch June 3, 2026 14:58
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.

2 participants