Skip to content

Build wheels

Build wheels #3

Workflow file for this run

name: Build wheels
on:
workflow_dispatch: ~
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
CIBW_TEST_REQUIRES: tox
CIBW_TEST_COMMAND: cd {project} && tox
CIBW_TEST_SKIP: "*-win*"
CIBW_BUILD_VERBOSITY: 1
- name: Store wheels
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.os }}
path: ./wheelhouse/*.whl
upload_pypi:
name: Upload to pypi
runs-on: ubuntu-latest
needs:
- build_wheels
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: dist-*
merge-multiple: true
path: dist
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Twine
run: |
pip install twine
- name: upload to pypi
run: twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}