ci: migrate to push-based release flow - #792
Conversation
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.
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
left a comment
There was a problem hiding this comment.
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.
|
Thanks for catching this! Applied the Also propagated the same fix to:
So when the migration wave rolls, every consuming repo gets the defensive guard from day one. |
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:
Added:
.github/workflows/auto-release.yaml— single workflow that runs on push tomain(andrelease-*branches for backports). git-cliff computes the next version from conventional commits since the last reachable tag, thengh release createatomically 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 --bumpflag 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-assetsfor the muster binary.Expected behavior after merge
The merge commit's conventional type (
ci:) doesn't trigger a bump in git-cliff's default —cimaps to "Changed" but onlyfeat/fix/ breaking actually bump. So this PR likely produces no release on its own. The next conventionalfix:orfeat:lands as the first release under the new flow.Related