|
| 1 | +# Automatic Versioning (Semver) |
| 2 | + |
| 3 | +The project uses automatic versioning based on [Semantic Versioning](https://semver.org/) principles using [Conventional Commits](https://www.conventionalcommits.org/). |
| 4 | + |
| 5 | +## How it works |
| 6 | + |
| 7 | +1. **On push to `main`** the `Release (Semver)` workflow is triggered |
| 8 | +2. **semantic-release** analyzes commits since the last tag |
| 9 | +3. The next version is determined by commit types: |
| 10 | + - `fix:` or `fix(scope):` → **patch** (1.0.0 → 1.0.1) |
| 11 | + - `feat:` or `feat(scope):` → **minor** (1.0.0 → 1.1.0) |
| 12 | + - `BREAKING CHANGE:` in footer or `!` after type → **major** (1.0.0 → 2.0.0) |
| 13 | +4. `Chart.yaml`, `package.json` are updated, `CHANGELOG.md` is created |
| 14 | +5. A git tag `vX.Y.Z` and GitHub Release are created |
| 15 | +6. Build workflows build images with the new version |
| 16 | + |
| 17 | +## Commit format |
| 18 | + |
| 19 | +``` |
| 20 | +<type>(<scope>): <description> |
| 21 | +
|
| 22 | +[optional body] |
| 23 | +
|
| 24 | +[optional footer] |
| 25 | +``` |
| 26 | + |
| 27 | +**Types:** |
| 28 | +- `feat` — new functionality (minor) |
| 29 | +- `fix` — bug fix (patch) |
| 30 | +- `docs` — documentation (no release) |
| 31 | +- `style` — formatting (no release) |
| 32 | +- `refactor` — refactoring (no release) |
| 33 | +- `test` — tests (no release) |
| 34 | +- `chore` — maintenance changes (no release) |
| 35 | + |
| 36 | +**Examples:** |
| 37 | +``` |
| 38 | +feat(api): add new endpoint for health check |
| 39 | +fix(processor): resolve memory leak in Kafka consumer |
| 40 | +docs: update installation guide |
| 41 | +``` |
| 42 | + |
| 43 | +**Breaking change:** |
| 44 | +``` |
| 45 | +feat(api)!: remove deprecated endpoint |
| 46 | +
|
| 47 | +BREAKING CHANGE: /v1/legacy endpoint has been removed |
| 48 | +``` |
| 49 | + |
| 50 | +## Configuration files |
| 51 | + |
| 52 | +- `.github/workflows/release.yml` — main release workflow |
| 53 | +- `.releaserc.json` — semantic-release configuration (plugins, Chart.yaml and package.json updates) |
| 54 | + |
| 55 | +## Manual release |
| 56 | + |
| 57 | +To manually create a release, create a tag: |
| 58 | + |
| 59 | +```bash |
| 60 | +git tag v1.2.3 |
| 61 | +git push origin v1.2.3 |
| 62 | +``` |
| 63 | + |
| 64 | +Build workflows will build artifacts for this tag. For automatic Chart.yaml and package.json updates, use conventional commits and merge into main. |
0 commit comments