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>
This commit is contained in:
2 files changed
+39
-1
No files matched your search
@@ -0,0 +1,38 @@
|
||||
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
|
||||
Reference in new issue
Block a user