Skip to content

Wheels

Wheels #27

Workflow file for this run

name: Wheels
on:
push:
tags:
- v*
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
# cibuildwheel is configured via pyproject.toml
- name: cibuildwheel
uses: pypa/[email protected]
env:
# Otherwise PyTorch builds may fail on MacOS: https://cibuildwheel.readthedocs.io/en/stable/cpp_standards/#macos-and-deployment-target-versions
CIBW_ENVIRONMENT: CI_COMMIT_TAG="${{ github.ref_name }} MACOSX_DEPLOYMENT_TARGET='10.14'"
# Force UTF-8 mode (especially for Windows)
PYTHONUTF8: 1
- name: upload_artifacts
uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
upload_pypi:
needs: build_wheels
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- name: upload_pypi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}