Skip to content

Publish to PyPI

Publish to PyPI #15

Workflow file for this run

name: Publish to PyPI
on:
workflow_call:
inputs:
python-version:
required: false
type: string
default: "3.10"
release:
types: [ created ]
jobs:
release:
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: pypi
permissions:
# IMPORTANT: this permission is mandatory for Trusted Publishing
id-token: write
steps:
- uses: actions/checkout@v4
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ inputs.python-version }}
- name: Install dependencies
run: |
uv sync
- name: Build package
run: uv build --wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1