Skip to content

Bump version to 0.2.0 #1

Bump version to 0.2.0

Bump version to 0.2.0 #1

Workflow file for this run

name: Publish to PyPI
on:
push:
tags:
- "v*.*.*"
jobs:
publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write # Required for trusted publishing
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Extract version from tag
id: get_version
run: |
TAG=${GITHUB_REF#refs/tags/v}
echo "VERSION=$TAG" >> $GITHUB_OUTPUT
echo "Publishing version: $TAG"
- name: Update version in pyproject.toml
run: |
sed -i "s/^version = .*/version = \"${{ steps.get_version.outputs.VERSION }}\"/" pyproject.toml
cat pyproject.toml | grep "^version"
- name: Install build dependencies
run: uv pip install --system build
- name: Build package
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
print-hash: true