Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PyPI publishing #233

Merged
merged 5 commits into from
Oct 25, 2024
Merged
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
9 changes: 5 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
#!/bin/bash

TAG_VALUE=${GITHUB_REF/refs\/tags\//}
echo "version=${TAG_VALUE}" >> $GITHUB_ENV
echo "version=${TAG_VALUE}" >> $GITHUB_OUTPUT

# Extract the repository name (minus the owner/org)
reponame=$(basename $GITHUB_REPOSITORY)
Expand All @@ -136,9 +136,10 @@ jobs:
- name: Validate tag version
if: ${{ startsWith(github.ref, 'refs/tags') }}
run: |
PYTHON_VERSION=$(grep "\bversion='[^']+'" | awk -F "'" '{print $2}')
if [ "${steps.version.outputs.version}" != "$PYTHON_VERSION" ]; then
echo "Version mismatch; tag version is [${steps.version.outputs.version}] but Python version is [$PYTHON_VERSION]"
PYTHON_VERSION=$(grep -E "\bversion='[^']+'" setup.py | 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
exit 1
fi

Expand Down