Skip to content

Commit

Permalink
Merge pull request #6 from peteryefi/dev
Browse files Browse the repository at this point in the history
Updated pipeline to check package existence
  • Loading branch information
peteryefi authored Oct 21, 2024
2 parents c5dbacf + 4113936 commit 6eacfa6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ jobs:
run: |
python setup.py sdist bdist_wheel
- name: Check if version exists on PyPI
run: |
VERSION=$(python setup.py --version)
if twine check dist/* | grep -q "This version already exists on PyPI"; then
echo "Version $VERSION already exists on PyPI. Skipping upload."
exit 0
fi
- name: Upload package to PyPI
env:
TWINE_USERNAME: __token__
Expand Down

0 comments on commit 6eacfa6

Please sign in to comment.