Skip to content

Commit

Permalink
fix: publish via pyproject.toml instead of setup.py for version details
Browse files Browse the repository at this point in the history
  • Loading branch information
duttonw committed Dec 10, 2024
1 parent bc23a20 commit 8d8cf34
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ jobs:
- name: Validate tag version
if: ${{ startsWith(github.ref, 'refs/tags') }}
run: |
TAG_VALUE=${GITHUB_REF/refs\/tags\//}
PYTHON_VERSION=$(grep -E '\bversion\s?=\s?"[^"]+"' pyproject.toml | awk -F '"' '{print $2}')
echo "Tag version is [${{ steps.version.outputs.version }}], Python version is [$PYTHON_VERSION]"
if [ "${{ steps.version.outputs.version }}" != "$PYTHON_VERSION" ]; then
echo "Version mismatch; tag version is [${{ steps.version.outputs.version }}] but Python version is [$PYTHON_VERSION]" >> $GITHUB_STEP_SUMMARY
if [ "$TAG_VALUE" != "$PYTHON_VERSION" ]; then
echo "Version mismatch; tag version is [$TAG_VALUE] but Python version is [$PYTHON_VERSION]" >> $GITHUB_STEP_SUMMARY
exit 1
fi
Expand Down

0 comments on commit 8d8cf34

Please sign in to comment.