Skip to content

Release

Release #4

Workflow file for this run

name: Publish to PyPI
on:
push:
tags:
- "v*" # Trigger on tags like v1.0.0, v2.1.0, etc.
workflow_dispatch: # Allow manual triggering
jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install UV
run: |
pip install uv
- name: Install dependencies
run: uv install
- name: Build the package
run: uv build
- name: Wait for approval
uses: peter-evans/wait-for-approval@v3
with:
approvers: bigredfrog # Specify the user who needs to approve
- name: Publish to PyPI
if: ${{ github.event_name == 'workflow_dispatch' }} # Ensure this step runs only on manual trigger
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: uv publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}