Trunk-based Workflow
Multiple "right ways" to implement trunk-based delepment and workflow. For more info checkout trunkbaseddevelopment.com. Tom's "right way" emphisies forward moving flow and deploying from artifacts rather than git SHAs:
-
All code change starts and ends with the single, long-lived trunk, main. There are no release, prod, or other long-lived branches. Releases are cut from the trunk.
-
Code review will utilize GitHub PRs from short-lived branches targeting the main trunk. We call these short-lived branches, working branches, to avoid conflating feature-based workflow with our trunk-based workflow.
-
Prior to integration, the proposed change is fully tested, even deployed when end-to-end or manual acceptance tests are needed. Git Hooks are used to run unit tests and static analysis prior to pushing.