diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index ad5722df..915dda02 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -72,18 +72,25 @@ jobs: fi shell: bash - - name: Deploy to PyPI + - name: Deploy wheels to PyPI if: steps.check-tag.outputs.match == 'true' run: | pip install twine twine upload wheelhouse/*.whl - if [[ ${{ startsWith(matrix.os, 'ubuntu') && matrix.python == 'cp311' }} ]]; then - # build and upload sdist only once - pip install build - python -m build - twine upload dist/matscipy-*.tar.gz - fi env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} shell: bash + + - name: Deploy sdist to PyPI + if: ${{ steps.check-tag.outputs.match == 'true' && startsWith(matrix.os, 'ubuntu') && matrix.python == 'cp311' }} + run: | + pip install build + python -m build + twine upload dist/matscipy-*.tar.gz + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + shell: bash + +