Skip to content

v0.3.0 — AgentWrit Python SDK public release #1

v0.3.0 — AgentWrit Python SDK public release

v0.3.0 — AgentWrit Python SDK public release #1

Workflow file for this run

name: Publish to PyPI
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: read
jobs:
publish:
name: Build & Publish to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Build package
run: uv build
- name: Verify package version matches tag
if: startsWith(github.ref, 'refs/tags/v')
run: |
TAG_VERSION="${GITHUB_REF#refs/tags/v}"
PKG_VERSION=$(grep '^version' pyproject.toml | head -1 | sed 's/.*"\(.*\)".*/\1/')
if [ "${TAG_VERSION}" != "${PKG_VERSION}" ]; then
echo "::error::Tag version (${TAG_VERSION}) does not match package version (${PKG_VERSION})"
exit 1
fi
echo "Version verified: ${PKG_VERSION}"
- name: Publish to PyPI
run: uv publish dist/*
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}