v0.1.26 #1
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: 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 |