Skip to content

v0.1.9

v0.1.9 #12

Workflow file for this run

name: Publish to PyPI
on:
release:
types: [published]
jobs:
publish:
name: Build and Publish to PyPI
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python
run: uv python install
- name: Extract version from release
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Update version in pyproject.toml
run: |
sed -i "s/version = \".*\"/version = \"$VERSION\"/" pyproject.toml
- name: Install build dependencies
run: uv sync --all-extras
- name: Build the project
run: uv build
- name: Publish to PyPI
run: uv publish