Skip to content

Release v2.21.1

Release v2.21.1 #699

Workflow file for this run

name: Build package / publish
on:
# On PR commits, check build completes w/o error.
pull_request:
branches: [ main ]
push:
branches: [ main ]
# Publish on any push of a new tag, including
# 'v*rc*' pushed to a PR branch.
tags: [ "v*" ]
# Publish on new releases.
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@v4
# On 'pull_request' and some 'push' events,
# setuptools-scm or versioningit will give
# '0.1.dev1'. To confirm that the build system
# generates the desired version string,
# uncomment these lines and adjust fetch-depth.
# with:
# fetch-depth: 10
# fetch-tags: true
- uses: astral-sh/setup-uv@v5
with:
cache-dependency-glob: "**/pyproject.toml"
python-version: "3.13"
- name: Build
run: uv build
- name: Publish
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/
run: uv publish --trusted-publishing=always