Build Python release #15
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
# Builds Python wheels (including stubs) and creates a draft release | |
name: Build Python release | |
on: [workflow_dispatch] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macos-11, windows-2019] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up QEMU | |
if: runner.os == 'Linux' | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_BEFORE_BUILD_LINUX: "python3 -m pip install cmake" | |
CIBW_ARCHS_MACOS: "x86_64 arm64" | |
CIBW_ARCHS_LINUX: "auto aarch64" | |
CIBW_BUILD: "cp310-macosx_x86_64 cp310-macosx_arm64 cp310-win_amd64 cp310-manylinux_x86_64 cp310-manylinux_aarch64 cp310-musllinux_aarch64 cp311-macosx_x86_64 cp311-macosx_arm64 cp311-win_amd64 cp311-manylinux_x86_64 cp311-manylinux_aarch64 cp311-musllinux_aarch64" | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- if: matrix.os == 'ubuntu-20.04' | |
name: Create stubs | |
run: | | |
python -m pip install wheel | |
python ./tools/generate-stubs.py ./wheelhouse linux pybiginteger | |
- name: Deploy | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: Draft | |
name: Draft | |
draft: true | |
files: | | |
./wheelhouse/*.whl | |
env: | |
GITHUB_TOKEN: ${{ secrets.deploy }} |