ci: add PyPI publish workflow (tag v* → upload)

This commit is contained in:
Hongming Wang 2026-04-16 03:50:17 -07:00
parent fefcc38e11
commit cd067df651

17
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,17 @@
name: Publish to PyPI
on:
push:
tags: ['v*']
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: '3.11' }
- run: pip install build twine
- run: python -m build
- run: twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}