From 3b31cbcb143c4df053429aa040199fe02aed752b Mon Sep 17 00:00:00 2001 From: Alexandros Kritikos Date: Sun, 30 Aug 2026 02:29:30 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=8C=20Updates=20versioning=20calculati?= =?UTF-8?q?on?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/skills/new-release/SKILL.md | 10 +++++++--- GitVersion.yml | 11 +++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/skills/new-release/SKILL.md b/.github/skills/new-release/SKILL.md index 8592cda..9eccb7a 100644 --- a/.github/skills/new-release/SKILL.md +++ b/.github/skills/new-release/SKILL.md @@ -10,14 +10,18 @@ Versioning is **GitVersion-driven** (`GitVersion.yml`). Do not hand-pick version ## Versioning +The root `GitVersion.yml` uses the `TrunkBased/preview1` workflow. Its `Mainline` strategy is what makes stable branches increment per commit rather than holding one version until the next tag. + | Branch | Label | Resulting version | | --- | --- | --- | -| `main` | — | `MAJOR.MINOR.PATCH` (stable, held until the next tag) | -| `feature/*`, `hotfix/*` | branch name | `…-.N` | +| `main`, `release/*` | — | `MAJOR.MINOR.PATCH` (stable; **patch increments on every commit**) | +| `feature/*` | branch name | `…-.N` (pre-release; merging bumps **minor**) | +| `hotfix/*` | branch name | `…-.N` (pre-release; merging bumps **patch**) | - Tags use the prefix `v` (regex `[vV]?` also accepts `V` or none). - Each `src/*` project is versioned **independently**: only changes under that project's own directory, `Directory.Packages.props`, or `GitVersion.yml` increment its version (see `GenerateProjectGitVersionConfig` in `src/Directory.Build.props`, which renders the root `GitVersion.yml` into a per-project copy). A change to one library does not bump a sibling's version. -- Increments are suppressed for already-merged branches and already-tagged commits. +- All five packages still share one tag namespace, so a tag rebases every project's `MAJOR.MINOR` at once. Only the patch/pre-release counters diverge per project. +- Increments are suppressed on already-tagged commits, so the tagged commit builds exactly the tagged version. ## Changelog diff --git a/GitVersion.yml b/GitVersion.yml index 9ccc2dc..895349e 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -5,13 +5,16 @@ ignore: paths: - ^(?!src\/|Directory\.Packages\.props|GitVersion.yml).* branches: - main: + release: mode: ContinuousDeployment - feature: - mode: ContinuousDelivery - regex: ^(features?|hotfix(es)?)[\/-](?.+) + label: '' + increment: Patch + regex: ^releases?[\/-](?.+) source-branches: - main + is-release-branch: true + is-main-branch: true + pre-release-weight: 55000 prevent-increment: of-merged-branch: true