feat(release-prep): manually-triggered GHA workflow to draft prep PRs#110
Merged
Conversation
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.
What this adds
A manually-triggered GHA workflow that opens a "release: vX.Y.Z prep" PR — modeled exactly on PR #105 (the v0.3.2 prep). The workflow does the mechanical work (CHANGELOG section insertion, Chart.yaml bump, doc version-string bumps, categorized PR-list comment). The human keeps every judgment call: whether to release, what version, what CHANGELOG prose, and the tag push after PR merge.
Why
Every release so far has involved the same hand-work: bump six files, write a section header, look through merged PRs to draft notes. Automating it removes the friction without surrendering the editorial decisions. Concretely, the workflow:
patch | minor | major) rather than typed version string — computes the next tag from the latest stable one.feat/fix/build(deps)/chore(deps)/docs/refactor/test/ci/build/chore/other) including!:breaking-change variants.What stays manual (deliberately)
git tag vX.Y.Z main && git push origin vX.Y.Z) — existingrelease.yml+helm-release.ymlpublish from the pushed tag, unchanged.Architecture
.github/workflows/release-prep.yml—workflow_dispatchorchestrator (59 lines)hack/release-prep.sh— single-file logic, runnable locally for debugging (322 lines)Workflow grants
contents: write(push therelease/v*-prepbranch) +pull-requests: write(open PR + comment). Never writes tomain.Safety guardrails baked in
origin— protects against the goreleaser force-retag failure mode.>boundary ongh pr list --search "merged:>$latest_tag_date"— excludes the prior release-prep PR (whosemergedAtmatches the tag commit's date).sed_strictfail-on-no-match — any expected doc-version-string pattern that doesn't match aborts the run. Drift in install pins is caught loudly.release/v*-prepbefore re-cutting.Verification
Static checks: YAML parses;
bash -nclean on the script.Local dry-run against current
main(latest tagv0.3.2, 4 PRs merged since: #106–#109, allbuild(deps)):The file mutations match PR #105's diff shape modulo target version — CHANGELOG scaffold above
## [0.3.2],Chart.yamlversion/appVersionbumped,charts/projection/README.mdimage tag bumped,README.md+docs/getting-started.md--versionandinstall.yamlURLs bumped,docs/security.mdbothcosign verifylines bumped. PR #105 reference: 6d350cf.Sample of the CHANGELOG mutation:
What this PR does NOT cover
workflow_dispatchworkflows aren't triggerable from a non-default branch, so the first real release cut after this merges IS the integration test. The risk surface is small: live mode is a mechanicalcpof the same$workdirfiles that dry-run diffs against, so a CI-only divergence is unlikely.releaselabel auto-creation.gh pr create --label releasewill fail the first time if the label doesn't exist on the repo. One-offgh label create release --color BFD4F2solves it.RELEASING.mdonce the workflow has been exercised live once.How to use, once merged
patch/minor/major)dry_runontruethe first time — read the step summary, confirm the diff and PR comment look rightdry_run: falseto actually open the prep PRgit tag vX.Y.Z main && git push origin vX.Y.Z— existing release pipeline takes over