Skip to content

Use trusted publisher #99

Use trusted publisher

Use trusted publisher #99

Workflow file for this run

name: wheels
on:
workflow_dispatch:
release:
types:
- published
pull_request:
paths:
- ".github/workflows/wheels.yml"
jobs:
make_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-tags: true
fetch-depth: 0
- name: Build SDist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz
build_wheels:
name: Wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-tags: true
fetch-depth: 0
- uses: pypa/cibuildwheel@v2.19.2
env:
MACOSX_DEPLOYMENT_TARGET: 10.14
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
path: wheelhouse/*.whl
pypi-publish:
needs: [build_wheels, make_sdist]
name: Upload release to PyPI
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1