PyPI Push #130
This file contains hidden or 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: 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' |