Goals of this plan:
- Eliminate interruptions to an in-progress release
- Move towards a trunk based continuous delivery model (https://trunkbaseddevelopment.com/)
- Avoid disruption to engineers
prodbranch - the branch that is used for production releasesreleasebranch - Branches forked frommainthat are used for releases
- Checkout latest
main - Create a new
release branchin the formatrelease-v0.1.0 - Publish release branch with
git push -u origin release-v0.1.0 - Confirm with all contributors to the release that the release branch is ready
- Contributors can be found with
git rev-list v0.0.0..HEADwherev0.0.0is the previous release - Fixes can be cherry picked from
maininto the release branch during this time
- Contributors can be found with
- Open a PR in GitHub from
release-v0.1.0toprod - Once merged, create a release in Github targeting
prodwith a new tag in the formatv0.1.0. - Delete the release branch
- Create a hotfix branch in the format
hotfix-v0.1.1from the tip ofprod - Cherry-pick the fix commit from
maininto thehotfix-v0.1.1branch - Open a PR in GitHub from
hotfix-v0.1.1toprod - Once merged, create a release in Github targeting
prodwith a new tag in the formatv0.1.1.
mainis the source of truth for the codebase- Release branches and hotfix branches are never merged into main
- Any changes to a
releaseorhotfixbranch must be done by cherry-picking commits frommain.- This means you can not push changes to
releaseorhotfixbranches directly.
- This means you can not push changes to
mainshould be considered to as stable. Do not push changes tomainthat are not ready to be inprod.- If a feature isn't ready for release, consider putting it behind a feature flag.
- Task branches should be small and committed frequently.
- Merges into
prodshould not be squash merges. This ensures we can determine contributors since the last release. Merges intomaincan still be squashed.
