Release to PyPI #169
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: Release to PyPI | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# macos-latest is arm, macos-13 is i386 | |
os: [ubuntu-20.04, windows-2019, macos-latest, macos-13] | |
steps: | |
- uses: actions/checkout@main | |
with: | |
fetch-depth: 0 | |
# Used to host cibuildwheel | |
- uses: actions/setup-python@main | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel | |
- name: Build wheels | |
run: python -m cibuildwheel --output-dir wheelhouse | |
- name: publish | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_PWD }} | |
run: | | |
pipx install twine | |
twine upload --skip-existing wheelhouse/* | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
with: | |
fetch-depth: 0 | |
- name: Build sdist | |
run: pipx run build --sdist | |
- name: publish | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_PWD }} | |
run: | | |
pipx install twine | |
twine upload --skip-existing dist/* |