Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build Wheels

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types: [ published ]

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.21.3
env:
CIBW_BUILD: cp311-* cp312-* cp313-*
CIBW_SKIP: pp* *-musllinux*
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_ARCHS_LINUX: x86_64 aarch64
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
CIBW_BEFORE_ALL_LINUX: dnf install -y --enablerepo=powertools poppler-cpp-devel
CIBW_BEFORE_ALL_MACOS: brew install poppler
MACOSX_DEPLOYMENT_TARGET: "15.0"

- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl

upload_release:
name: Upload wheels to GitHub Release
needs: build_wheels
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
permissions:
contents: write

steps:
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
merge-multiple: true
path: dist

- name: Upload wheels to release
uses: softprops/action-gh-release@v1
with:
files: dist/*.whl