Skip to content

Publish Python package to PyPI #3

Publish Python package to PyPI

Publish Python package to PyPI #3

Workflow file for this run

name: Publish-PyPI
run-name: Publish Python package to PyPI
# -- Trigger Events --------------------------------------------------------------------------------
on:
workflow_dispatch:
# -- Concurrency -----------------------------------------------------------------------------------
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# -- Jobs ------------------------------------------------------------------------------------------
jobs:
# Publish to PyPI
publish-pypi:
runs-on: ubuntu-latest
environment: publish
permissions:
id-token: write
steps:
- name: Checkout code
id: checkout-code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
id: setup-uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Publish with uv
id: publish
run: |
uv build
uv publish --publish-url https://upload.pypi.org/legacy/ --trusted-publishing always