Skip to content

build: create a new release version 1.3.1 #5

build: create a new release version 1.3.1

build: create a new release version 1.3.1 #5

name: tag-version-check
# Enforces the release invariant: a version tag X.Y.Z must sit on a commit whose
# umbrella webtrit_callkeep/pubspec.yaml version is X.Y.Z (see docs/release_process.md).
on:
push:
tags:
- "*.*.*"
permissions:
contents: read
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify umbrella version matches the tag
run: |
TAG="${GITHUB_REF_NAME}"
VERSION_FIELD=$(grep -m1 '^version:' webtrit_callkeep/pubspec.yaml | awk '{print $2}')
VERSION="${VERSION_FIELD%%+*}"
echo "tag=$TAG pubspec version=$VERSION_FIELD (base $VERSION)"
if [ "$VERSION" != "$TAG" ]; then
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)."
exit 1
fi
echo "OK: tag matches the umbrella version."