chore(release): 2.4.1 #30
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 to PyPI | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| ci: | |
| name: Lint + Tests | |
| uses: ./.github/workflows/ci.yml | |
| publish: | |
| name: Build & Publish | |
| runs-on: ubuntu-latest | |
| needs: ci | |
| environment: pypi | |
| permissions: | |
| id-token: write # required for OIDC trusted publisher | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install poetry | |
| run: pip install poetry | |
| - name: Set version from tag | |
| run: | | |
| TAG=${GITHUB_REF#refs/tags/v} | |
| poetry version "$TAG" | |
| - name: Build package | |
| run: poetry build | |
| - name: Publish to PyPI | |
| # Pinned to an immutable commit SHA (v1.14.0) — the floating | |
| # `release/v1` tag would let an upstream compromise inject code | |
| # into our release pipeline, which has `id-token: write`. | |
| uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0 |