We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc3dfde commit b61e5a9Copy full SHA for b61e5a9
1 file changed
.github/workflows/release.yml
@@ -37,6 +37,20 @@ jobs:
37
steps:
38
- uses: actions/checkout@v4
39
40
+ # Fail fast if the tag doesn't match pyproject.toml's version, so the
41
+ # GitHub Release name can never disagree with the version the binaries
42
+ # report (db --version) or the one published to PyPI.
43
+ - name: Check tag matches package version
44
+ if: startsWith(github.ref, 'refs/tags/')
45
+ run: |
46
+ pkg=$(grep -m1 '^version' pyproject.toml | cut -d'"' -f2)
47
+ tag=${GITHUB_REF_NAME#v}
48
+ if [ "$pkg" != "$tag" ]; then
49
+ echo "::error::Tag v${tag} does not match pyproject.toml version ${pkg}. Bump pyproject.toml (e.g. 'make bump-patch') and re-tag."
50
+ exit 1
51
+ fi
52
+ echo "Tag and package version agree: ${pkg}"
53
+
54
- name: Install uv
55
uses: astral-sh/setup-uv@v5
56
with:
0 commit comments