Skip to content

Commit

Permalink
Merge pull request #233 from ckan/feat/cicd-publish
Browse files Browse the repository at this point in the history
Fix PyPI publishing
  • Loading branch information
duttonw authored Oct 25, 2024
2 parents f398fa0 + ac46cad commit 6b68959
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit 6b68959

Please sign in to comment.