Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Check version matches
run: |
# Extract version from pyproject.toml using Python
PACKAGE_VERSION=$(python -c "import tomli; print(tomli.loads(open('pyproject.toml', 'rb').read().decode('utf-8'))['project']['version'])")
# Extract version from git tag (remove 'v' prefix)
GIT_TAG_VERSION=${GITHUB_REF#refs/tags/v}
# Compare versions
if [ "$PACKAGE_VERSION" != "$GIT_TAG_VERSION" ]; then
echo "Error: Version mismatch between pyproject.toml ($PACKAGE_VERSION) and git tag ($GIT_TAG_VERSION)"
exit 1
fi
echo "Version check passed: $PACKAGE_VERSION"
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "note-python"
version = "1.5.2"
version = "1.5.4"
description = "Cross-platform Python Library for the Blues Wireless Notecard"
authors = [
{name = "Blues Inc.", email = "support@blues.com"},
Expand Down