Skip to content

release 1.61

release 1.61 #17

Workflow file for this run

name: Release build and upload to PyPI
# Build on every published release
on:
release:
types:
- published
workflow_dispatch:
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Need to be PIP517 build in order to avoid setuptools bug - https://github.com/pypa/cibuildwheel/issues/813
# I dunno enough about the work involved in that - sorry!
# os: [ubuntu-latest, windows-latest, macos-11, macos-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.10'
- name: Build wheels
uses: pypa/[email protected]
env:
# I can't get windows tests to work, but at least here's linux testing the built wheels
CIBW_TEST_REQUIRES: pytest
CIBW_ARCHS_MACOS: 'x86_64 arm64'
# CIBW_BUILD: 'cp39-* cp310-* cp311-* cp312-*'
CIBW_SKIP: 'cp36-* cp37-*'
CIBW_TEST_COMMAND_LINUX: "cd {project} && pytest -v tests/"
# doesn't work?: CIBW_ENVIRONMENT_MACOS: 'CFLAGS="-DMA_NO_RUNTIME_LINKING -framework AudioToolbox "'
- uses: actions/upload-artifact@v2
with:
name: pypi_artifacts
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.10'
- name: Build sdist
run: python setup.py sdist
- uses: actions/upload-artifact@v2
with:
name: pypi_artifacts
path: dist/*.tar.gz
upload_pypi:
name: Upload to PyPi
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v2
with:
name: pypi_artifacts
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TEST_TOKEN }}