Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish to PyPI

on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
publish:
description: "Publish to PyPI publish"
required: false
default: false
type: boolean

jobs:
pypi-publish:
name: Upload release to PyPI
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@v6

- uses: actions/setup-python@v6
with:
python-version: "3.14"

- name: Install build tool
run: pip install build

# Create wheel and source dist
- name: Build
run: python -m build

- name: Publish package to PyPI
if: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.publish) }}
uses: pypa/gh-action-pypi-publish@release/v1