v2.0.0-alpha8 #9
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
| # Automatically builds and publishes Python package to TestPyPI when a GitHub release is published. | |
| # Uses build library to create distribution files from pyproject.toml configuration, | |
| # then uploads to TestPyPI using official PyPA GitHub Action with Trusted Publishing. | |
| # Trusted Publishing eliminates the need for API tokens by using cryptographic attestations | |
| # to verify the package was built by this specific GitHub workflow. | |
| # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | |
| name: Upload Package to TestPyPI | |
| on: | |
| workflow_dispatch: | |
| release: | |
| types: [published] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Building Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install --upgrade build | |
| - name: Build package | |
| run: | | |
| python -m build | |
| - name: pypi-publish | |
| uses: pypa/gh-action-pypi-publish@v1.12.4 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| verbose: true | |
| attestations: true |