Release #26
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: Release | |
| # Publish only. Triggered by a tag (hand-pushed tags publish directly) or by a | |
| # workflow_dispatch from versioning.yml (the automatic path, since a | |
| # GITHUB_TOKEN-pushed tag cannot trigger push:tags). Stays named release.yml so | |
| # the PyPI trusted-publisher (OIDC) binding is unchanged. | |
| on: | |
| push: | |
| tags: ['v*'] | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Tag to publish (e.g. v0.1.2)' | |
| required: true | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| release: | |
| name: Build and publish | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: "${{ github.event.inputs.tag || github.ref }}" | |
| fetch-depth: 0 | |
| - uses: astral-sh/setup-uv@v7 | |
| - name: Build | |
| run: uv build | |
| - name: Create GitHub release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| tag_name: "${{ github.event.inputs.tag || github.ref_name }}" | |
| files: dist/* | |
| generate_release_notes: false | |
| - name: Publish to PyPI | |
| run: uv publish --trusted-publishing automatic |