Skip to content

feat: regenerate for spec 0.107.0, and fix the endpoint shim #7

feat: regenerate for spec 0.107.0, and fix the endpoint shim

feat: regenerate for spec 0.107.0, and fix the endpoint shim #7

Workflow file for this run

name: Publish
on:
push:
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
# OIDC trusted publishing — no PYPI_TOKEN secret required. The PyPI side
# must register github.com/QTSurfer/api-client-python as a trusted
# publisher for the project named `qtsurfer-api-client` (one-time setup).
jobs:
publish:
name: build + publish to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/qtsurfer-api-client
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Set up Python 3.12
run: uv python install 3.12
- name: Sync dependencies
run: uv sync --frozen
- name: Verify tag matches pyproject.toml version
run: |
TAG_VERSION="${GITHUB_REF_NAME#v}"
PYPROJECT_VERSION=$(uv run python -c "import tomllib; print(tomllib.loads(open('pyproject.toml','rb').read().decode())['project']['version'])")
echo "tag: $TAG_VERSION"
echo "pyproject: $PYPROJECT_VERSION"
if [ "$TAG_VERSION" != "$PYPROJECT_VERSION" ]; then
echo "::error::Tag ($TAG_VERSION) does not match pyproject.toml version ($PYPROJECT_VERSION)."
exit 1
fi
- name: Fetch openapi.yaml
run: curl -fsSL https://raw.githubusercontent.com/QTSurfer/qtsurfer.github.io/main/openapi.yaml -o openapi.yaml
- name: Build
run: uv run python -m build
- name: Twine check
run: uv run twine check dist/*
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1