From 6c2e9cfdf5b5226640a69c715ca66507361e153e Mon Sep 17 00:00:00 2001 From: Boris Bolliet Date: Sun, 29 Sep 2024 16:39:02 +0100 Subject: [PATCH] Update build_wheels.yml --- .github/workflows/build_wheels.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 }}