Some checks are pending
docker-build-cometbft / vars (push) Waiting to run
docker-build-cometbft / build-images (amd64, ubuntu-24.04) (push) Blocked by required conditions
docker-build-cometbft / build-images (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
docker-build-cometbft / merge-images (push) Blocked by required conditions
docker-build-e2e-node / vars (push) Waiting to run
docker-build-e2e-node / build-images (amd64, ubuntu-24.04) (push) Blocked by required conditions
docker-build-e2e-node / build-images (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
docker-build-e2e-node / merge-images (push) Blocked by required conditions
33 lines
1 KiB
YAML
33 lines
1 KiB
YAML
# Checks that, if we're working on a release branch and are about to cut a
|
|
# release, we have set the version correctly.
|
|
name: Check release version
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'release/**'
|
|
|
|
jobs:
|
|
check-version:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.22'
|
|
|
|
- name: Check version
|
|
run: |
|
|
# We strip the refs/heads/release/v prefix of the branch name.
|
|
BRANCH_VERSION=${GITHUB_REF#refs/heads/release/v}
|
|
# Get the version of the code, which has no "v" prefix.
|
|
CODE_VERSION=`go run ./cmd/cometbft/ version`
|
|
if [ "$BRANCH_VERSION" != "$CODE_VERSION" ]; then
|
|
echo ""
|
|
echo "Branch version ${BRANCH_VERSION} does not match code version ${CODE_VERSION}"
|
|
echo ""
|
|
echo "Please either fix the release branch naming (which must have a 'release/v' prefix)"
|
|
echo "or the version of the software in version/version.go."
|
|
exit 1
|
|
fi
|