Skip to content

[pre-commit.ci] pre-commit autoupdate #383

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #383

Workflow file for this run

name: Build
on:
push:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_wheels:
name: Build wheels on ${{ matrix.sys.os }}
runs-on: ${{ matrix.sys.os }}
strategy:
fail-fast: true
matrix:
sys:
- { os: windows-2019, shell: bash }
- { os: ubuntu-20.04, shell: bash }
- { os: macos-11, shell: bash }
defaults:
run:
shell: ${{ matrix.sys.shell }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
- name: Make wheels Pythonless
run: |
python -m pip install wheel>=0.40.0
wheel tags --python-tag py3 --abi-tag none --remove ./wheelhouse/*.whl
- uses: actions/upload-artifact@v4
with:
name: python-wheels-${{ matrix.sys.os }}
path: ./wheelhouse/*.whl
publish:
needs: [build_wheels]
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: python-wheels*
path: dist
merge-multiple: true
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
password: ${{ secrets.TEST_PYPI_API_KEY }}
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_KEY }}