Skip to content

v0.1.32

v0.1.32 #2

Workflow file for this run

name: Release
on:
release:
types: [published]
permissions:
contents: read
jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
environment: pypi
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Verify tag matches package version
run: |
version=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
if [ "${GITHUB_REF_NAME}" != "v${version}" ]; then
echo "Release tag ${GITHUB_REF_NAME} does not match pyproject.toml version v${version}" >&2
exit 1
fi
- run: uv sync --python 3.11 --frozen --extra dev
- run: uv run ruff check .
- run: uv run mypy
- run: uv run pytest -v
- run: uv build
- run: uv run --with twine twine check dist/*
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1