2.0.1 — post-release hardening #2
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: Release | |
| # Build wheels + sdist and publish them. Publishing only happens for a GitHub Release; | |
| # workflow_dispatch builds the artifacts (for testing the pipeline) without publishing. | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| build_wheels: | |
| name: Wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # manylinux x86_64, Windows amd64, and macOS (arm64 runner builds both arm64 and, | |
| # via cross-compile, x86_64 — see [tool.cibuildwheel.macos] in pyproject.toml). This | |
| # avoids depending on the scarce/deprecated macos-13 Intel runner. | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.4 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-${{ matrix.os }} | |
| path: ./wheelhouse/*.whl | |
| build_sdist: | |
| name: Source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build sdist | |
| run: pipx run build --sdist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: sdist | |
| path: dist/*.tar.gz | |
| publish: | |
| name: Attach artifacts to the GitHub Release | |
| needs: [build_wheels, build_sdist] | |
| runs-on: ubuntu-latest | |
| # Only attach for an actual release, never for a manual dispatch. | |
| if: github.event_name == 'release' | |
| permissions: | |
| contents: write # upload assets to the GitHub Release | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| # PyPI publishing is intentionally not enabled yet — wheels + sdist are attached to the | |
| # GitHub Release. See docs/releasing.md to turn on PyPI Trusted Publishing later. | |
| - name: Attach wheels and sdist to the GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/* |