Skip to content

Commit

Permalink
fix: build pypi package after tagging the version (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarIthawi authored Aug 15, 2023
1 parent a07e899 commit 3a7d023
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,20 @@ jobs:
- name: Install Dependencies
run: pip install setuptools wheel

- name: Build package
run: python setup.py sdist bdist_wheel

- name: Update the tag version in setup.py
if: env.NEXT_VERSION
run: |
NEXT_VERSION_PYPI=${NEXT_VERSION:1} # Remove the leading 'v' to match PyPi's versioning scheme
sed -i -e "s/version=.*,/version='$NEXT_VERSION_PYPI' # tagged by release.yml,/" setup.py
cat setup.py
cat setup.py # Debug setup.py output
- name: Build package
run: python setup.py sdist bdist_wheel

- name: Print built package version
run: |
echo "DEBUG: checking the version within the pip wheel .whl file"
less dist/*.whl | head -n 20
- name: Publish to PyPi
if: env.NEXT_VERSION
Expand Down

0 comments on commit 3a7d023

Please sign in to comment.