diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e875396..abd3003 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -26,6 +26,7 @@ jobs: - uses: actions/upload-artifact@v4 with: + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index}} path: ./wheelhouse/*.whl build_sdist: @@ -34,6 +35,8 @@ jobs: if: github.event_name == 'release' && github.event.action == 'published' steps: - uses: actions/checkout@v4 + with: + submodules: true - name: Build sdist run: pipx run build --sdist @@ -44,17 +47,16 @@ jobs: upload_pypi: needs: [build_wheels, build_sdist] + environment: pypi + permissions: + id-token: write runs-on: ubuntu-latest - # upload to PyPI on every tag starting with 'v' - # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') - # alternatively, to publish when a GitHub Release is created, use the following rule: if: github.event_name == 'release' && github.event.action == 'published' steps: - uses: actions/download-artifact@v4 with: - # unpacks default artifact into dist/ - # if `name: artifact` is omitted, the action will create extra parent dir - name: artifact + name: cibw-* path: dist + merge-multiple: true - uses: pypa/gh-action-pypi-publish@release/v1