Skip to content

v2.10.4 (2024-02-20) #9

v2.10.4 (2024-02-20)

v2.10.4 (2024-02-20) #9

Workflow file for this run

name: Build and upload to PyPI
on:
release:
types: [published]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.x'
- name: Build wheels
# For very recent Python versions, wheels from e.g. numpy might not be
# available yet which can cause the build to fail. Keep going, and upload
# the wheels for all of the previous versions when that happens.
continue-on-error: true
uses: pypa/cibuildwheel@v2.1.1
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.x'
- name: Install build
run: python -m pip install build
- name: Build sdist
run: python -m build --sdist
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
upload_pypi:
name: Upload to PyPI
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4.1.1
with:
name: sdist
path: dist
- uses: actions/download-artifact@v4.1.1
with:
path: dist
merge-multiple: true # put contents of each wheel folder into dist/
pattern: wheels-*
- uses: pypa/gh-action-pypi-publish@v1.8.11
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}