Publish Release to PyPI #3
Workflow file for this run
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: Publish Release to PyPI | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| dist: | |
| name: Build Release Distributions | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v6 | |
| - name: Build Wheel and Source Distribution | |
| run: pipx run build | |
| - name: Validate Package Metadata | |
| run: pipx run twine check dist/* | |
| - name: Upload Release Artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pypi-dists | |
| path: dist/* | |
| publish-to-pypi: | |
| name: Publish Artifacts to PyPI | |
| needs: | |
| - dist | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/seiscat | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download Release Artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pypi-dists | |
| path: dist | |
| - name: Upload Artifacts to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |