Skip to content

Commit

Permalink
check version before deployment (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
arogozhnikov authored Dec 20, 2024
1 parent 6ac5705 commit 550aa0f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ jobs:
with:
# Use the minimum Python version in pyproject.toml (later versions should maintain backwards-compatibility)
python-version: "3.10"
- name: check version
run: |
GIT_TAG=$(git describe --tags --exact-match 2>/dev/null || echo "No tag")
CODE_VERSION=v$(hatch version)
if [[ "$GIT_TAG" != "$CODE_VERSION" ]]; then
echo "version mismatch: $GIT_TAG and $CODE_VERSION"
exit 1
fi
- name: Install dependencies
run: |
Expand Down

0 comments on commit 550aa0f

Please sign in to comment.