diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index e27b2ac9..2e5a62f6 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -258,13 +258,14 @@ jobs: else echo "No wheels to upload." fi - - if [ "$(ls -A dist)" ]; then - echo "Uploading source distribution..." - twine upload dist/* + + if [ -d "dist" ] && [ "$(ls -A dist)" ]; then + echo "Uploading source distribution to PyPI..." + twine upload dist/*.tar.gz || echo "Source distribution upload failed, probably cause it's already there continuing..." else echo "No source distribution to upload." fi + env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}