Skip to content

Commit

Permalink
Update build_wheels.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
borisbolliet authored Sep 28, 2024
1 parent 3187e80 commit 8a9f16d
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,29 @@ jobs:

- name: Upload distributions to PyPI
run: |
ls
ls
ls -R wheels-and-sdist-${{ matrix.os }}-${{ matrix.python-version }}
mkdir -p wheelhouse dist
# mv wheels-and-sdist--${{ matrix.os }}-${{ matrix.python-version }}/wheelhouse/* wheelhouse/
mv wheels-and-sdist-${{ matrix.os }}-${{ matrix.python-version }}/dist/* dist/
twine upload wheelhouse/* dist/*
# twine upload dist/*
if [ -d "wheels-and-sdist-${{ matrix.os }}-${{ matrix.python-version }}/wheelhouse" ]; then
mv wheels-and-sdist-${{ matrix.os }}-${{ matrix.python-version }}/wheelhouse/* wheelhouse/
fi
if [ -d "wheels-and-sdist-${{ matrix.os }}-${{ matrix.python-version }}/dist" ]; then
mv wheels-and-sdist-${{ matrix.os }}-${{ matrix.python-version }}/dist/* dist/
fi
if [ "$(ls -A wheelhouse)" ]; then
echo "Uploading wheels..."
twine upload wheelhouse/*
else
echo "No wheels to upload."
fi

if [ "$(ls -A dist)" ]; then
echo "Uploading source distribution..."
twine upload dist/*
else
echo "No source distribution to upload."
fi
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

0 comments on commit 8a9f16d

Please sign in to comment.