2020-07-14 19:43:19 +02:00
|
|
|
name: Publish Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
|
2021-10-23 21:57:46 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-07-14 19:43:19 +02:00
|
|
|
jobs:
|
2023-10-12 20:56:11 +02:00
|
|
|
build_wheels:
|
|
|
|
name: Build wheels on ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-22.04]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
2023-11-08 22:44:59 +01:00
|
|
|
- name: Set up QEMU
|
|
|
|
if: runner.os == 'Linux'
|
2023-11-08 23:43:38 +01:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2023-11-08 22:44:59 +01:00
|
|
|
with:
|
2023-11-08 22:47:40 +01:00
|
|
|
platforms: arm64
|
2023-11-08 22:44:59 +01:00
|
|
|
|
2023-10-12 20:56:11 +02:00
|
|
|
- name: Build wheels
|
2024-08-11 04:50:41 +02:00
|
|
|
uses: pypa/cibuildwheel@v2.20.0
|
2023-10-12 21:05:22 +02:00
|
|
|
env:
|
2023-11-11 21:10:57 +01:00
|
|
|
CIBW_SKIP: cp36-* cp37-* cp38-* cp39-* cp310-* pp* *musllinux*
|
2023-10-12 21:05:22 +02:00
|
|
|
CIBW_BEFORE_ALL_LINUX: apt-get install -y gcc || yum install -y gcc || apk add gcc
|
|
|
|
CIBW_BUILD_VERBOSITY: 3
|
2023-11-08 22:44:59 +01:00
|
|
|
CIBW_ARCHS_LINUX: auto aarch64
|
2023-10-12 21:05:22 +02:00
|
|
|
REQUIRE_CYTHON: 1
|
2023-10-12 20:56:11 +02:00
|
|
|
|
2024-08-28 01:25:37 +02:00
|
|
|
- uses: actions/upload-artifact@v4
|
2023-10-12 20:56:11 +02:00
|
|
|
with:
|
2024-08-28 01:25:37 +02:00
|
|
|
name: wheels
|
2023-10-12 20:56:11 +02:00
|
|
|
path: ./wheelhouse/*.whl
|
|
|
|
|
|
|
|
build_sdist:
|
|
|
|
name: Build source distribution
|
2020-07-14 19:43:19 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-25 00:04:02 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-10-12 20:56:11 +02:00
|
|
|
|
|
|
|
- name: Build sdist
|
|
|
|
run: pipx run build --sdist
|
|
|
|
|
2024-08-28 01:25:37 +02:00
|
|
|
- uses: actions/upload-artifact@v4
|
2023-10-12 20:56:11 +02:00
|
|
|
with:
|
2024-08-28 01:25:37 +02:00
|
|
|
name: sdist
|
2023-10-12 20:56:11 +02:00
|
|
|
path: dist/*.tar.gz
|
|
|
|
|
|
|
|
upload_pypi:
|
|
|
|
needs: [build_wheels, build_sdist]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
environment: pypi
|
|
|
|
permissions:
|
|
|
|
id-token: write
|
|
|
|
if: github.event_name == 'release' && github.event.action == 'published'
|
|
|
|
steps:
|
2024-04-17 00:26:39 +02:00
|
|
|
- name: Download artifacts
|
2024-08-28 01:25:37 +02:00
|
|
|
uses: actions/download-artifact@v4
|
2023-10-12 20:56:11 +02:00
|
|
|
with:
|
|
|
|
path: dist
|
2024-08-28 01:25:37 +02:00
|
|
|
merge-multiple: true
|
2023-10-12 20:56:11 +02:00
|
|
|
|
2024-04-17 00:26:39 +02:00
|
|
|
- name: Publish to PyPI
|
2024-06-17 19:21:45 +02:00
|
|
|
uses: pypa/gh-action-pypi-publish@v1.9.0
|