Skip to content

ci: use uv in cibuildwheel #21

ci: use uv in cibuildwheel

ci: use uv in cibuildwheel #21

Workflow file for this run

name: wheels
on:
workflow_dispatch:
release:
types:
- published
pull_request:
paths:
- .github/workflows/wheels.yml
jobs:
make_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build SDist
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
build_wheels:
name: Wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest] # all others built via Cirrus CI (including macos arm64)
#os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: yezz123/setup-uv@v4
- uses: pypa/[email protected]
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl
download_cirrus:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
checks: read
strategy:
matrix:
include:
- task: Build Linux x86 wheels.
name: linux-x86
- task: Build Linux aarch64 wheels.
name: linux-aarch64
- task: Build macOS arm64 wheels.
name: macos-arm64
steps:
- uses: getsentry/[email protected]
with:
task: ${{ matrix.task }}
dest: wheelhouse
commit: ${{ github.event.release.tag_name || github.sha }}
timeout-minutes: 30
- uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl
upload_all:
needs: [build_wheels, make_sdist, download_cirrus]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- name: Show artifacts
run: ls -lavh dist
- uses: pypa/gh-action-pypi-publish@release/v1