Files
syncthing-blade-mcp/.github/workflows/publish.yml
T
PiersandClaude Opus 4.7 11b4d40a57 chore: add PyPI publish workflow + bump 0.4.0
DD-182 Python Wave A backfill. OIDC trusted publishing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 14:31:36 +10:00

39 lines
905 B
YAML

name: Publish
on:
push:
tags:
- "v*"
jobs:
publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write # Trusted publishing
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- name: Set up Python
run: uv python install 3.12
- name: Verify tag matches pyproject.toml version
run: |
TAG="${GITHUB_REF#refs/tags/v}"
PKG="$(grep -E '^version = ' pyproject.toml | head -1 | sed -E 's/version = "(.*)"/\1/')"
if [ "$TAG" != "$PKG" ]; then
echo "Tag v$TAG does not match pyproject.toml version $PKG"
exit 1
fi
- name: Build distribution
run: uv build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1