Add a new branch cut GH workflow, and adopt setuptools-scm for version control (#15985)

This commit is contained in:
Kangyan-Zhou
2025-12-29 13:51:21 -08:00
committed by GitHub
parent c2e0913e17
commit 9c4eb46099
13 changed files with 380 additions and 93 deletions
+5 -5
View File
@@ -1,10 +1,8 @@
name: Release PyPI
on:
push:
branches:
- main
paths:
- "python/sglang/version.py"
tags:
- 'v[0-9]+.*'
workflow_dispatch:
jobs:
@@ -20,12 +18,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for setuptools-scm to determine version from tags
- name: Upload to pypi
run: |
cd python
cp ../README.md ../LICENSE .
pip install build
pip install build wheel setuptools setuptools-scm
python3 -m build
pip install twine
python3 -m twine upload dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }}