Versioning Guidance¶
1. Category¶
1.1. Semantic Versioning (SemVer)¶
Semantic Versioning (SemVer) and Conventional Commits are commonly used together to automate version tagging and updates to CHANGELOG.md in release pipelines.
1.1.1. Release¶
Semantic Versioning (SemVer) specifies a three-component version format: MAJOR.MINOR.PATCH.
-
Concepts and Components
-
MAJORIncrements when backward-incompatible changes are introduced.
Example:
1.0.0->2.0.0 -
MINORIncrements when backward-compatible functionality is added.
Example:
1.0.0->1.1.0 -
PATCHIncrements when backward-compatible bug fixes are introduced.
Example:
1.0.0->1.0.1
-
-
Rules
- Commit messages should follow Conventional Commits to enable release tooling to detect change types.
- Versions should follow the
MAJOR.MINOR.PATCHformat, with the appropriate component incremented according to the changes included in each release. - The release workflow should create a version tag and update
CHANGELOG.md.
1.1.2. Pre-release¶
Pre-release identifiers can be appended to a target version to distinguish a pre-release from its corresponding stable release.
-
Concepts and Components
-
alphaAn unstable pre-release identifier used for early testing.
Example progression:
1.0.0->1.1.0-alpha.0->1.1.0-alpha.1->1.1.0-alpha.2->1.1.0 -
betaA pre-release identifier typically used for broader testing.
Example progression:
1.0.0->1.1.0-beta.0->1.1.0-beta.1->1.1.0-beta.2->1.1.0 -
rcA pre-release identifier used for release candidates.
Example progression:
1.0.0->1.1.0-rc.0->1.1.0-rc.1->1.1.0 -
nextA pre-release identifier used to distribute iterative builds of upcoming releases.
Example progression:
1.0.0->1.1.0-next.1->1.1.0-next.2->1.1.0
-
-
Rules
- Pre-release versions are derived from the next planned stable version.
- Numeric suffixes (such as
.0,.1, and.2) should increase sequentially for each pre-release identifier. - To publish a stable release, remove the pre-release suffix and publish the resulting version.
1.1.3. Workflow¶
Based on Git Flow, the workflow illustrates how features are developed, integrated, and verified before the first stable release. Feature integration takes place on develop, release stabilization on a release/* branch, and stable releases on main.
-
Concepts and Components
-
Feature Integration
Feature branches are created from
developand merged back through reviewed pull requests. Alpha releases provide early snapshots for internal integration testing. -
Release Stabilization
Once the planned scope is complete, create
release/1.0.0fromdevelop. Publish beta versions for testing in merchant sandboxes and release candidates for final qualification. Limit changes on this branch to release fixes, documentation, and version preparation. -
Stable Release
Merge the approved release branch into
main, validate the merge result and final artifact, and publish1.0.0. Merge the release branch back intodevelopto retain its fixes in subsequent development.
-
-
Sequence and Diagram
The following version sequence follows the SemVer precedence rules:
1.0.0-alpha.0 < 1.0.0-alpha.1 < 1.0.0-alpha.2 < 1.0.0-beta.0 < 1.0.0-beta.1 < 1.0.0-beta.2 < 1.0.0-rc.0 < 1.0.0gitGraph TB: commit id: "chore(sdk): initialize project" branch develop checkout develop branch "feature/api" commit id: "feat(payments): add payments and refunds" checkout develop merge "feature/api" id: "chore(merge): integrate payment API" tag: "v1.0.0-alpha.0" commit id: "fix(auth): correct authentication handling" tag: "v1.0.0-alpha.1" commit id: "feat(webhooks): add signature verification" tag: "v1.0.0-alpha.2" branch "release/1.0.0" checkout "release/1.0.0" commit id: "chore(release): prepare 1.0.0-beta.0" tag: "v1.0.0-beta.0" commit id: "fix(payments): prevent duplicate charges" tag: "v1.0.0-beta.1" commit id: "chore(release): prepare 1.0.0-beta.2" tag: "v1.0.0-beta.2" commit id: "chore(release): prepare 1.0.0-rc.0" tag: "v1.0.0-rc.0" checkout main merge "release/1.0.0" id: "chore(release): version 1.0.0" tag: "v1.0.0" checkout develop merge "release/1.0.0" id: "chore(merge): integrate release fixes"Note
Commit labels follow the Conventional Commits specification.
-
Rules
- SemVer defines version precedence, whereas branch assignments and testing stages are project-specific conventions. A pre-release label alone does not establish release readiness.
- This workflow starts alpha, beta, and release-candidate numbering at
.0(alpha.0,beta.0, andrc.0). These starting values are project conventions, not SemVer requirements. - Pre-release identifiers are compared from left to right. Numeric identifiers are compared numerically (
alpha.0 < alpha.1 < alpha.2andbeta.0 < beta.1 < beta.2), while non-numeric identifiers are compared lexically in ASCII sort order (alpha < beta < rc). When preceding identifiers match, additional identifiers increase precedence. Every pre-release has lower precedence than the corresponding stable version. - Publish each version from a validated commit, create a unique version tag, and update
CHANGELOG.md. Do not replace a published version or move its release tag; publish a new version for subsequent changes. - If a release-blocking defect is discovered during qualification, fix it on the release branch and publish another candidate, such as
1.0.0-rc.1. Complete all release gates before publishing the stable version.
2. References¶
- Sentenz Versioning article.
- Sentenz Commit article.
- Sentenz Changelog article.
- Sentenz Branching Strategies article.