Skip to content

docs: moved from docs repo into usage (#186) #34

docs: moved from docs repo into usage (#186)

docs: moved from docs repo into usage (#186) #34

Workflow file for this run

---
name: Build and Publish
on:
push:
tags: ["v*"]
jobs:
build-and-publish:
name: Build and Publish
environment: protected
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install uv
uses: astral-sh/setup-uv@557e51de59eb14aaaba2ed9621916900a91d50c6 # v6.6.1
with:
version: "latest"
python-version: 3.13
- name: Validate version
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/v}
PROJECT_VERSION=$(uvx --from=toml-cli toml get --toml-path=pyproject.toml project.version)
if [ "$TAG_VERSION" != "$PROJECT_VERSION" ]; then
echo "Tag ($TAG_VERSION) doesn't match pyproject.toml ($PROJECT_VERSION)"
exit 1
fi
- name: Build package
run: uv build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0