Publish release to PyPI #2
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: | |
| workflow_dispatch: | |
| jobs: | |
| build-dist: | |
| name: Build distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv and Python | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "latest" | |
| python-version: "3.13" | |
| - name: Build distribution files (source tarball and binary wheel) | |
| run: uv build | |
| - name: Store distribution files as job artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-package-distributions | |
| path: dist/ | |
| publish-to-pypi: | |
| name: Publish distribution files to PyPI | |
| needs: | |
| - build-dist | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: "https://pypi.org/project/BYCEPS/" | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download job artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: python-package-distributions | |
| path: dist/ | |
| - name: Publish distribution to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |