v1.2.2 #27
Workflow file for this run
This file contains 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 | |
on: | |
release: | |
types: [published] | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
jobs: | |
build_wheels: | |
name: Build wheel ${{ matrix.python }}-${{ matrix.buildplat[0] }}-${{ matrix.buildplat[1] }} | |
runs-on: ${{ matrix.buildplat[0] }} | |
strategy: | |
# Ensure that a wheel builder finishes even if another fails | |
fail-fast: false | |
matrix: | |
buildplat: | |
- [ubuntu-22.04, manylinux_x86_64] | |
- [ubuntu-22.04, manylinux_i686] | |
- [ubuntu-22.04, musllinux_x86_64] | |
- [ubuntu-22.04, musllinux_i686] | |
python: ["cp310", "cp311", "cp312", "pp310"] | |
exclude: | |
- buildplat: [ubuntu-22.04, manylinux_i686] # numpy error | |
python: "pp310" | |
# Invalid combinations below | |
- buildplat: [ubuntu-22.04, musllinux_x86_64] | |
python: "pp310" | |
- buildplat: [ubuntu-22.04, musllinux_i686] | |
python: "pp310" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel>=2 | |
- name: Build wheels | |
env: | |
CIBW_PRERELEASE_PYTHONS: True | |
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} | |
run: python -m cibuildwheel --output-dir wheelhouse-${{ matrix.python }}-${{ matrix.buildplat[0] }}-${{ matrix.buildplat[1] }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: wheelhouse-${{ matrix.python }}-${{ matrix.buildplat[0] }}-${{ matrix.buildplat[1] }} | |
path: ./wheelhouse-${{ matrix.python }}-${{ matrix.buildplat[0] }}-${{ matrix.buildplat[1] }}/*.whl | |
build_sdist: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Build sdist | |
run: | | |
python -m pip install -U pip build | |
python -m build --sdist | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: wheelhouse-sdist | |
path: ./dist/* | |
upload_pypi: | |
needs: [build_wheels, build_sdist] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
# By omitting the name we are downloading all the artifacts | |
path: ./dist/ | |
- name: Publish a Python distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: ./dist/wheelhouse-* | |
- name: Upload Python packages for release notes | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
dist/wheelhouse-*/* |