Semantic Versioning & Release Best Practices¶
CupOfTea adheres to Semantic Versioning 2.0.0 and follows Keep a Changelog.
Current Version: v0.2.0
1. Version Format: MAJOR.MINOR.PATCH¶
| Component | Trigger | Example |
|---|---|---|
MAJOR |
Incompatible API changes, removals, breaking behavior | 1.0.0 → 2.0.0 |
MINOR |
Backwards-compatible new features, aggregations, formats | 0.2.0 → 0.3.0 |
PATCH |
Backwards-compatible bug fixes and performance tuning | 0.2.0 → 0.2.1 |
2. Commit Best Practices (Conventional Commits)¶
Use structured prefix messages:
feat(scope): ...→ New feature (MINOR)fix(scope): ...→ Bug fix (PATCH)perf(scope): ...→ Performance optimization (PATCH)feat(scope)!: ...orBREAKING CHANGE: ...→ Breaking change (MAJOR)docs(scope): ...→ Documentation onlyrefactor(scope): ...→ Code refactoring without behavior changetest(scope): ...→ Adding or modifying unit/integration testschore(scope): ...→ Build configuration, dependencies, or tooling
3. How to Release a New Version¶
-
Bump Version Across POMs: Update
pom.xmlin the root and all 9 module folders: -
Update
CHANGELOG.md: Add a new section for the release: -
Merge into Main/Master: When merged into
master(ormain), the automated GitHub Actions workflow (.github/workflows/release.yml) will: - Verify the version in
pom.xml(0.3.0). - Automatically tag
v0.3.0. - Identify the previous tag and collect all changes in between (commits, PRs, and changelog highlights via
.github/scripts/generate-release-notes.py). - Build all module JAR packages.
- Publish the GitHub Release with the complete release notes and attached binaries.
4. Pull Request Requirements (Merge Gate)¶
GitHub Actions runs .github/workflows/semver-check.yml on every Pull Request targeting develop, master, or main.
A PR will be blocked from merging if:
1. Version is not updated: The version in pom.xml matches the base branch.
2. Version is not strictly greater: The new version is lower than the base branch version (new_version <= base_version).
3. Submodule version mismatch: Any of the 9 reactor submodules (cupoftea-core, cupoftea-csv, etc.) differs from the root pom.xml.
4. Missing Changelog: No entry corresponding to the new version exists in CHANGELOG.md.