Add full action suite #15
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: Latest release | |
| env: | |
| CACHE_VERSION: 1 | |
| DEFAULT_PYTHON: "3.13" | |
| # Only run on merges | |
| on: | |
| pull_request: | |
| types: closed | |
| branches: | |
| - main | |
| jobs: | |
| publishing: | |
| name: Build and publish Python 🐍 distributions 📦 to PyPI | |
| runs-on: ubuntu-latest | |
| environment: pypi | |
| permissions: | |
| id-token: write | |
| # Only trigger on merges, not just closes | |
| if: github.event.pull_request.merged == true | |
| steps: | |
| - name: Check out committed code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ env.DEFAULT_PYTHON }} | |
| id: python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.DEFAULT_PYTHON }} | |
| - name: Prepare uv | |
| run: | | |
| pip install uv | |
| uv venv --seed venv | |
| - name: Build | |
| run: | | |
| . venv/bin/activate | |
| uv build | |
| - name: Publish distribution 📦 to PyPI | |
| run: | | |
| . venv/bin/activate | |
| uv publish |