Skip to content

Commit 4f57d16

Browse files
committed
Add a release check in the release workflow
1 parent 5549b93 commit 4f57d16

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v6
14+
- name: Verify tag matches version.go
15+
run: |
16+
TAG="${GITHUB_REF#refs/tags/v}"
17+
VERSION="$(grep -oP 'Version = "\K[^"]+' version.go)"
18+
if [ "$TAG" != "$VERSION" ]; then
19+
echo "::error::Tag v${TAG} does not match Version in version.go (${VERSION}). Please update version.go."
20+
exit 1
21+
fi
1422
- uses: cli/gh-extension-precompile@v2
1523
with:
1624
go_version_file: go.mod

0 commit comments

Comments
 (0)