Skip to content

Commit b61e5a9

Browse files
committed
Bump to 0.2.2
1 parent fc3dfde commit b61e5a9

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@ jobs:
3737
steps:
3838
- uses: actions/checkout@v4
3939

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+
4054
- name: Install uv
4155
uses: astral-sh/setup-uv@v5
4256
with:

0 commit comments

Comments
 (0)