Skip to content
Merged
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
64 changes: 64 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build wheels
# inspired by: https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml

on:
push:
pull_request:
release:
types: [created]

jobs:
build_wheels:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-11, windows-2019]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.11.2

- name: setup xcode version
if: startsWith(matrix.os, 'macos')
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '11'
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
# to supply options, put them in 'env', like:
env:
CIBW_SKIP: "*-musllinux_i686"
# CIBW_SOME_OPTION: value

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl


deploy:
needs: [build_wheels]
runs-on: ubuntu-latest
name: Deploy
if: github.event_name == 'release' && github.event.action == 'created'
steps:
- name: download artifacts
uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist
- name: build sdist
run: pipx run build --sdist
- name: deploy
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}