diff --git a/.github/workflows/build_upload_pypi_wheels.yml b/.github/workflows/build_upload_pypi_wheels.yml index fb6ddf8b7..e47bfffab 100644 --- a/.github/workflows/build_upload_pypi_wheels.yml +++ b/.github/workflows/build_upload_pypi_wheels.yml @@ -78,25 +78,35 @@ jobs: output-dir: wheelhouse - name: Create source distribution - if: matrix.os == 'windows-latest' && matrix.python-version == '3.11' + if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' shell: bash -l {0} run: | python setup.py sdist - - name: Upload as build artifacts + - name: Upload source dist as build artifact + if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' # && github.event_name == 'release' uses: actions/upload-artifact@v3 with: - name: wheels + name: python source distribution + path: dist + + - name: Upload wheels as build artifacts + uses: actions/upload-artifact@v3 + with: + name: binary wheels path: wheelhouse/*-${{ matrix.wheelname }}*.whl - - name: Upload source dist to PyPI - if: github.event_name == 'release' && matrix.os == 'windows-latest' && matrix.python-version == '3.11' - uses: pypa/gh-action-pypi-publish@release/v1 + publish: + runs-on: ubuntu-latest + needs: build + permissions: + id-token: write + steps: + - name: Download build artifacts to Ubuntu environment + uses: actions/download-artifact@v4 with: - packages-dir: dist/ + path: dist/ - - name: Upload wheel to PyPI - if: github.event_name == 'release' + - name: Upload wheels to PyPI + # if: github.event_name == 'release' uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages-dir: wheelhouse/