Skip to content

3.8 is out and 3.13 is in (#149) #177

3.8 is out and 3.13 is in (#149)

3.8 is out and 3.13 is in (#149) #177

Workflow file for this run

# Based on
# https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
name: Publish Python distributions to PyPI and TestPyPI
on: [push, pull_request]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2022, macOS-13]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.12"
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.21.3
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.12"
- name: Install build
run: python -m pip install build==1.2.2.post1
- name: Build sdist
run: python -m build --sdist
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
name: Build and publish Python distributions to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
name: sdist
path: dist
- uses: actions/[email protected]
with:
name: ubuntu-20.04
path: dist
- uses: actions/[email protected]
with:
name: windows-2022
path: dist
- uses: actions/[email protected]
with:
name: macOS-13
path: dist
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_API_TOKEN }}