Build wheels #1
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 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_BUILD: "*312*" | |
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: | |
path: ./wheelhouse/*.whl | |
upload_pypi: | |
name: Upload to pypi | |
runs-on: ubuntu-latest | |
needs: | |
- build_wheels | |
steps: | |
- name: Donwload Artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
path: dist | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- 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 }} |