This repository was archived by the owner on Feb 11, 2026. It is now read-only.
Upload Python Package #8
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: Upload Python Package | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| release-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Build release distributions | |
| run: | | |
| uv build | |
| - name: Upload distributions | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-dists | |
| path: dist/ | |
| pypi-publish: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - release-build | |
| steps: | |
| - name: Retrieve release distributions | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: release-dists | |
| path: dist/ | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Publish release distributions to PyPI | |
| env: | |
| TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
| run: | | |
| uv publish -t $TOKEN |