Skip to content

PyPI Push

PyPI Push #130

Workflow file for this run

name: PyPI Push
on:
workflow_run:
workflows: [Wheels]
types:
- completed
jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
environment: pypi
permissions:
id-token: write
attestations: write
steps:
- run: echo 'The wheels workflow succeeded and uploaded artifacts'
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: actions/attest-build-provenance@v2
with:
subject-path: 'dist/**/*'
- uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'release' && github.event.action == 'published'
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'The Wheels workflow failed so we cannot push to PyPI'