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
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish Python Package to PyPI

on:
push:
tags:
- 'v*.*.*' # Trigger on version tags like v1.0.0
workflow_dispatch: # Allow manual trigger

jobs:
build-and-publish:
runs-on: ubuntu-latest
# Enable OIDC token permissions for Trusted Publisher
permissions:
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Upgrade pip
run: python -m pip install --upgrade pip

- name: Install build tools
run: pip install build

- name: Build the package
run: python -m build

- name: Publish package distributions to PyPI using Trusted Publisher
# This action uses OIDC to authenticate without API tokens
uses: pypa/gh-action-pypi-publish@release/v1