action #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish | |
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] | |
python-version: [3.8, 3.9, '3.10', 3.11] | |
# exclude: | |
# - os: macos-latest | |
# python-version: 3.7 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Build wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
args: --release --out dist | |
# - name: Install auditwheel | |
# if: runner.os == 'Linux' | |
# run: pip install auditwheel | |
# - name: Repair wheels | |
# if: runner.os == 'Linux' | |
# run: | | |
# for whl in dist/*.whl; do | |
# auditwheel repair "$whl" --plat manylinux_2_28_x86_64 -w ./dist/ | |
# rm $whl | |
# done | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: wheels | |
path: dist | |
publish: | |
name: Publish to PyPI | |
needs: [build_wheels] | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: wheels | |
path: dist | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
verbose: true |