WHL: upgrade cibw, migrate static configuration to pyproject.toml, enable cp313 wheels #476
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build CI Wheels | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| paths: | |
| - '.github/workflows/wheels.yml' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ | |
| ubuntu-latest, | |
| windows-latest, | |
| macos-latest, | |
| macos-15-intel, | |
| ] | |
| fail-fast: false | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v5 | |
| - name: Install python | |
| uses: actions/setup-python@v6 | |
| - name: Fetch all history for all tags and branches | |
| run: | | |
| git fetch --prune --unshallow | |
| - name: Build wheels for CPython | |
| uses: pypa/[email protected] | |
| with: | |
| output-dir: dist | |
| - uses: actions/upload-artifact@v5 | |
| with: | |
| name: wheels-${{ matrix.os }} | |
| path: ./dist/*.whl | |
| build_sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v5 | |
| - name: Build sdist | |
| run: pipx run build --sdist | |
| - name: Upload sdist | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: sdist | |
| path: dist/*.tar.gz | |
| deploy: | |
| name: Publish to PyPI | |
| needs: [build_wheels, build_sdist] | |
| runs-on: ubuntu-latest | |
| # upload to PyPI on every tag starting with 'v-' | |
| if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | |
| steps: | |
| - name: Download sdist | |
| uses: actions/download-artifact@v6 | |
| with: | |
| name: sdist | |
| path: dist | |
| - name: Download wheels | |
| uses: actions/download-artifact@v6 | |
| with: | |
| pattern: wheels-* | |
| path: dist | |
| merge-multiple: true | |
| - name: Publish to PyPI | |
| uses: pypa/[email protected] | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_TOKEN }} |