ci: add PyPI trusted publisher workflow

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
GitHub
2026-05-26 18:19:50 +08:00
co-authored by Claude Opus 4.7
parent 76e344df80
commit 00986c1898
+27
View File
@@ -0,0 +1,27 @@
name: Publish to PyPI
on:
push:
tags:
- "v*"
jobs:
build-and-publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- run: pip install build
- run: python -m build
- uses: pypa/gh-action-pypi-publish@release/v1