Bump actions/cache from 4 to 5 in the all-actions group #1857
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: Build package / publish | |
| on: | |
| pull_request: { branches: [ main ] } | |
| push: { tags: [ "v*" ] } | |
| release: { types: [ published ] } | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| publish: | |
| environment: { name: publish } | |
| permissions: { id-token: write } | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: { python-version: "3.14" } | |
| - run: uv build | |
| - run: uv publish --trusted-publishing=always | |
| if: >- | |
| github.event_name == 'release' || ( | |
| github.event_name == 'push' | |
| && startsWith(github.ref, 'refs/tags') | |
| ) | |
| # Uncomment for testing | |
| # env: { UV_PUBLISH_URL: "https://test.pypi.org/legacy/" } | |