Git Flow Release Cycle
GitFlow Process
Development: All development work happens in the
development
branch. This is where new features, bug fixes, and improvements are added.Staging: Once the features are tested and ready, they are merged into the
staging
branch. This branch is used for final testing before the changes are moved to themain
branch.Main: The
main
branch is where the stable version of the code resides. Changes from thestaging
branch are merged intomain
when they are ready for release.
Release Cycle
The release cycle is managed using Semantic Release, which automates the versioning and changelog generation process. Here's how it works:
Commit Messages: Each commit message should follow the Conventional Commits specification. This allows Semantic Release to automatically determine the type of version bump (major, minor, or patch) that should be made.
CI/CD Pipeline: When changes are pushed to the
main
orstaging
branch, the CI/CD pipeline is triggered. This pipeline runs tests, builds the project, and prepares it for release.Semantic Release: Semantic Release analyzes the commit messages since the last release, determines the next version number, generates the changelog, and creates a new release.
Changelog: The changelog is automatically updated with each release, providing a detailed list of the changes made. The changelog can be found in the
CHANGELOG.md
file.Versioning: The versioning follows the Semantic Versioning specification. Each release is tagged with the version number in the format
vX.Y.Z
.
Tags on the staging branch are used to mark release candidates (RC) and are in the format vX.Y.Z-rc.N
. Once the RC is tested and ready for release, it is merged into the main branch and tagged with the final version number in the format vX.Y.Z
.