@@ -15,6 +15,22 @@ imports GitVersion through `src\Directory.Build.props`, so normal `dotnet build`
1515` .\build.ps1 ` , ` .\run-app-local.ps1 ` , and CI builds all derive assembly metadata
1616from the same tag history.
1717
18+ ## Tagged and untagged builds
19+
20+ Tagged releases must resolve to the exact tag SemVer:
21+
22+ - ` vX.Y.Z ` -> ` X.Y.Z `
23+ - ` vX.Y.Z-alpha.N ` -> ` X.Y.Z-alpha.N `
24+
25+ Untagged ` master ` checkouts are still prerelease builds. After an alpha tag,
26+ GitVersion advances to the next alpha prerelease until another tag pins the
27+ version. For example, after ` v0.6.0-alpha.5 ` , an untagged commit on ` master `
28+ may resolve to ` 0.6.0-alpha.6 ` .
29+
30+ ` GitVersion.yml ` intentionally gives the ` master ` /` main ` branch the ` alpha `
31+ label so alpha tags are treated as exact version sources. Do not remove that
32+ label unless the release train stops using alpha tags.
33+
1834## Assembly metadata
1935
2036GitVersion-derived builds set:
@@ -46,6 +62,11 @@ value that could hide drift.
4662Release build jobs must check out full git history (` fetch-depth: 0 ` ) so
4763GitVersion can see tags.
4864
65+ Tagged CI runs verify that ` github.ref_name ` and GitVersion's ` SemVer ` output
66+ match before build artifacts are published. If a release tag is
67+ ` v0.6.0-alpha.5 ` , CI must produce ` 0.6.0-alpha.5 ` ; a derived value such as
68+ ` 0.6.0-alpha.6 ` or ` 0.6.0-712 ` is a release-blocking error.
69+
4970## Local scripts
5071
5172` scripts\Get-OpenClawVersion.ps1 ` uses the repository-local
@@ -68,6 +89,8 @@ For example:
6889- Do not hardcode user-visible version strings like ` vX.Y.Z ` in active code or
6990 tests; use ` AppVersionInfo ` .
7091- Keep release tags and ` GitVersion.yml ` as the versioning contract.
92+ - Keep ` GitVersion.yml ` configured so exact alpha tags resolve to their tag
93+ SemVer, and keep CI's tag/version verification enabled.
7194
7295## References
7396
0 commit comments