Publish Release #3
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
| # Publish release to PyPi | |
| name: Publish Release | |
| on: | |
| # Trigger on release, to publish release packages to PyPI | |
| release: | |
| types: [published] | |
| # Run the workflow manually | |
| # This might be useful if the automated publish fails for some reason (use with CARE!!) | |
| workflow_dispatch: | |
| jobs: | |
| pypi-publish: | |
| name: Upload release to PyPI | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.x" | |
| - name: deps | |
| run: python -m pip install -U hatch | |
| - name: build | |
| run: hatch build | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| # this is just for testing, remove for flight: | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| verbose: true |