Supported Branching Models
This page summarizes branching models that align well with semantic-release and those that are officially unsupported.
Supported Branching Models
Section titled “Supported Branching Models”These models align with the delivery and release assumptions built into semantic-release.
Trunk-Based Development
Section titled “Trunk-Based Development”Committing Straight to Trunk
Section titled “Committing Straight to Trunk”Short-Lived Feature Branches
Section titled “Short-Lived Feature Branches”Continuous Integration
Section titled “Continuous Integration”Continuous Deployment/Release
Section titled “Continuous Deployment/Release”GitHub Flow
Section titled “GitHub Flow”Officially Unsupported Branching Models
Section titled “Officially Unsupported Branching Models”These models conflict with the default expectations of semantic-release and are not supported by the project team.
Trunk-Based Development: Branch for Release
Section titled “Trunk-Based Development: Branch for Release”Exception:
- Late Creation of Release Branches - our maintenance release is an example of this approach
Git Flow: Long-Lived Branch Orchestration (develop/release/hotfix)
Section titled “Git Flow: Long-Lived Branch Orchestration (develop/release/hotfix)”Even if this is a strategy that you find useful for the applications you are building, the original author of the git-flow branching model recommends against it for that context, we do not recommend this long-lived branch orchestration pattern when releasing artifacts with semantic-release. While the same reflection that recommends against using git-flow for web apps suggests that it may still be a good fit for explicitly versioned software, semantic-release is built with Continuous Deployment/Release in mind instead.
While some have found that the Pre-release workflow enabled by semantic-release can be used to simulate a git-flow-like workflow, it is also worth noting that this orchestration pattern is not an intended use case and requests for support when attempting to use it that way will be closed by our team.
Workflows that Release for Testing Before Promotion to a Stable Release
Section titled “Workflows that Release for Testing Before Promotion to a Stable Release”Monorepos
Section titled “Monorepos”While monorepos are not specifically a branching strategy, they are also not an officially supported semantic-release setup at this time. That said, the same branching and release principles described on this page still apply to releasable artifacts in a monorepo. For teams that choose this approach, community plugins can enable monorepo support for now.