Skip to content

#12528 Add ABI3 wheels to support Python 3.14 and other future Python versions #123

#12528 Add ABI3 wheels to support Python 3.14 and other future Python versions

#12528 Add ABI3 wheels to support Python 3.14 and other future Python versions #123

Workflow file for this run

name: Build and upload to PyPI
on:
push:
branches:
- default
# To simplify the release process, the publishing is triggered on tag.
# We should make sure to only push tags for new releases.
# If we start using tags for non-release purposes,
# this needs to be updated.
#
# We need to explicitly configure an expression that matches anything.
tags: [ "**" ]
pull_request:
defaults:
run:
# Use bash on Windows for consistency.
shell: bash
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.14'
- name: Install deps
run: |
python -m pip install cibuildwheel==3.2.1 abi3audit==0.0.22
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
- name: Check files
run: ls -al wheelhouse/
- name: Audit ABI3 wheels
run: |
abi3audit -vsS wheelhouse/*abi3*.whl
- uses: actions/upload-artifact@v4
with:
name: artifact-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.9'
- name: Install build
run: |
python -m pip install build
- name: Build sdist
run: python -m build --sdist
- uses: actions/upload-artifact@v4
with:
name: artifact-sdist
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: artifact-*
merge-multiple: true
path: dist
- name: Check files
run: ls -al dist/
- name: Publish to PyPI - on tag
# Skip upload to PyPI if we don't have a tag
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1