Remove wheel merge job, merge artifacts on download (#1886)

This is supported by `actions/download-artifact@v4`, and endorsed by cibuildwheel
in their documentation (see https://cibuildwheel.pypa.io/en/stable/deliver-to-pypi/#github-actions).

Co-authored-by: dominic <510002+dmah42@users.noreply.github.com>
This commit is contained in:
Nicholas Junge 2024-12-10 13:27:12 +01:00 committed by GitHub
parent c8c66e0b4a
commit ae52c9e66e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -53,12 +53,11 @@ jobs:
platforms: all platforms: all
- name: Build wheels on ${{ matrix.os }} using cibuildwheel - name: Build wheels on ${{ matrix.os }} using cibuildwheel
uses: pypa/cibuildwheel@v2.21.3 uses: pypa/cibuildwheel@v2.22.0
env: env:
CIBW_BUILD: "cp310-* cp311-* cp312-*" CIBW_BUILD: "cp310-* cp311-* cp312-*"
CIBW_BUILD_FRONTEND: "build[uv]" CIBW_BUILD_FRONTEND: "build[uv]"
CIBW_SKIP: "*-musllinux_*" CIBW_SKIP: "*-musllinux_*"
CIBW_TEST_SKIP: "cp38-macosx_*:arm64"
CIBW_ARCHS_LINUX: auto64 aarch64 CIBW_ARCHS_LINUX: auto64 aarch64
CIBW_ARCHS_WINDOWS: auto64 CIBW_ARCHS_WINDOWS: auto64
CIBW_BEFORE_ALL_LINUX: bash .github/install_bazel.sh CIBW_BEFORE_ALL_LINUX: bash .github/install_bazel.sh
@ -74,27 +73,16 @@ jobs:
name: dist-${{ matrix.os }} name: dist-${{ matrix.os }}
path: wheelhouse/*.whl path: wheelhouse/*.whl
merge_wheels:
name: Merge all built wheels into one artifact
runs-on: ubuntu-latest
needs: [build_sdist, build_wheels]
steps:
- name: Merge wheels
uses: actions/upload-artifact/merge@v4
with:
name: dist
pattern: dist-*
delete-merged: true
pypi_upload: pypi_upload:
name: Publish google-benchmark wheels to PyPI name: Publish google-benchmark wheels to PyPI
needs: [merge_wheels] needs: [build_sdist, build_wheels]
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
id-token: write id-token: write
steps: steps:
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:
name: dist
path: dist path: dist
pattern: dist-*
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1 - uses: pypa/gh-action-pypi-publish@release/v1