File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 2121 run : |
2222 python -m pip install --upgrade pip
2323 pip install build twine
24+ - name : Check version matches
25+ run : |
26+ # Extract version from pyproject.toml using Python
27+ PACKAGE_VERSION=$(python -c "import tomli; print(tomli.loads(open('pyproject.toml', 'rb').read().decode('utf-8'))['project']['version'])")
28+ # Extract version from git tag (remove 'v' prefix)
29+ GIT_TAG_VERSION=${GITHUB_REF#refs/tags/v}
30+ # Compare versions
31+ if [ "$PACKAGE_VERSION" != "$GIT_TAG_VERSION" ]; then
32+ echo "Error: Version mismatch between pyproject.toml ($PACKAGE_VERSION) and git tag ($GIT_TAG_VERSION)"
33+ exit 1
34+ fi
35+ echo "Version check passed: $PACKAGE_VERSION"
2436 - name : Build and publish
2537 env :
2638 TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44
55[project ]
66name = " note-python"
7- version = " 1.5.2 "
7+ version = " 1.5.4 "
88description = " Cross-platform Python Library for the Blues Wireless Notecard"
99authors = [
1010 {name = " Blues Inc." , email = " support@blues.com" },
You can’t perform that action at this time.
0 commit comments