Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
SamirMoustafa authored Aug 11, 2024
1 parent d2518c4 commit 155041c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ jobs:
run: |
PACKAGE_NAME=$(python setup.py --name)
CURRENT_VERSION=$(python setup.py --version)
VERSION_EXISTS=$(pip index versions $PACKAGE_NAME | grep $CURRENT_VERSION || true)
if [ -z "$VERSION_EXISTS" ]; then
if ! twine upload --skip-existing dist/*; then
echo "Version does not exist on PyPI, proceeding with upload."
echo "exists=false" >> $GITHUB_ENV
else
echo "Version already exists on PyPI, skipping upload."
echo "exists=true" >> $GITHUB_ENV
fi
- name: Upload to PyPI
if: env.exists == 'false'
run: python -m twine upload dist/*
Expand Down

0 comments on commit 155041c

Please sign in to comment.