Skip to content

Build and upload to PyPI #74

Build and upload to PyPI

Build and upload to PyPI #74

Workflow file for this run

name: Build and upload to PyPI
on:
workflow_dispatch:
inputs:
wip:
description: "Publish work in progress package."
required: false
default: "true"
jobs:
build_wheels:
name: Build ${{ matrix.cfg.name }} wheels
runs-on: ${{ matrix.cfg.os }}
strategy:
matrix:
cfg:
- os: ubuntu-20.04
env:
CIBW_ARCHS_LINUX: x86_64
CIBW_BUILD: "cp313-manylinux_x86_64"
- os: ubuntu-20.04
env:
CIBW_ARCHS_LINUX: x86_64
CIBW_BUILD: "cp313-musllinux_x86_64"
- os: ubuntu-20.04
name: ""
env:
CIBW_ARCHS_LINUX: i686
CIBW_BUILD: "cp313-manylinux_i686"
- os: ubuntu-20.04
env:
CIBW_ARCHS_LINUX: i686
CIBW_BUILD: "cp313-musllinux_i686"
- os: ubuntu-20.04
env:
CIBW_ARCHS_LINUX: aarch64
CIBW_BUILD: "cp313-manylinux_aarch64"
- os: ubuntu-20.04
env:
CIBW_ARCHS_LINUX: ppc64le
CIBW_BUILD: "cp313-manylinux_ppc64le"
- os: windows-2019
env:
CIBW_BUILD: "cp313-win_amd64"
- os: windows-2019
env:
CIBW_BUILD: "cp313-win32"
- os: macos-latest
env:
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_BUILD: "cp313-macosx_*"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Adjust version (wip)
if: ${{ github.event.inputs.wip == 'true' }}
run: python .github/adjust_version.py
- name: Adjust version (release)
if: ${{ github.event.inputs.wip == 'false' }}
run: python .github/adjust_version.py --release
- name: Build wheels
uses: pypa/[email protected]
env: ${{ matrix.cfg.env }}
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
upload_pypi:
needs: [build_wheels]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/[email protected]
if: ${{ github.event.inputs.wip == 'true' }}
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- uses: pypa/[email protected]
if: ${{ github.event.inputs.wip == 'false' }}
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN_RELEASE }}