File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : tag-version-check
2+
3+ # Enforces the release invariant: a version tag X.Y.Z must sit on a commit whose
4+ # umbrella webtrit_callkeep/pubspec.yaml version is X.Y.Z (see docs/release_process.md).
5+
6+ on :
7+ push :
8+ tags :
9+ - " *.*.*"
10+
11+ permissions :
12+ contents : read
13+
14+ jobs :
15+ verify :
16+ runs-on : ubuntu-latest
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Verify umbrella version matches the tag
21+ run : |
22+ TAG="${GITHUB_REF_NAME}"
23+ VERSION_FIELD=$(grep -m1 '^version:' webtrit_callkeep/pubspec.yaml | awk '{print $2}')
24+ VERSION="${VERSION_FIELD%%+*}"
25+ echo "tag=$TAG pubspec version=$VERSION_FIELD (base $VERSION)"
26+ if [ "$VERSION" != "$TAG" ]; then
27+ echo "::error::Tag '$TAG' does not match webtrit_callkeep version '$VERSION_FIELD'. The tag must sit on the version-bump commit (see docs/release_process.md)."
28+ exit 1
29+ fi
30+ echo "OK: tag matches the umbrella version."
Original file line number Diff line number Diff line change @@ -39,9 +39,10 @@ where that version is already set. Tags are **immutable** - never move a publish
3939
4040## Enforcement
4141
42- A CI check validates the invariant on tag push: it reads ` webtrit_callkeep/pubspec.yaml ` at the
43- tagged commit and fails if the ` X.Y.Z ` part of ` version: ` does not equal the tag name. This makes
44- every published tag a reliable, immutable pointer to its exact release.
42+ A CI check (` .github/workflows/tag-version-check.yaml ` ) validates the invariant on tag push: it
43+ reads ` webtrit_callkeep/pubspec.yaml ` at the tagged commit and fails if the ` X.Y.Z ` part of
44+ ` version: ` does not equal the tag name. This makes every published tag a reliable, immutable
45+ pointer to its exact release.
4546
4647## Tag corrections
4748
You can’t perform that action at this time.
0 commit comments