From f3a518f625bc371fa7b76805e0d5924a0ab21e4d Mon Sep 17 00:00:00 2001 From: zhyncs Date: Thu, 25 Jul 2024 19:47:18 +1000 Subject: [PATCH 1/2] feat: add pypi upload workflow --- .github/workflows/pypi.yml | 28 ++++++++++++++++++++++++++++ python/sglang/__init__.py | 4 ++-- python/sglang/version.py | 1 + 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/pypi.yml create mode 100644 python/sglang/version.py diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 00000000000..281134a29c8 --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,28 @@ +name: publish to pypi +on: + push: + branches: + - main + paths: + - "python/sglang/version.py" + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + environment: 'prod' + steps: + - name: Set up python3.8 + uses: actions/setup-python@v4 + with: + python-version: '3.8' + - name: Checkout repository + uses: actions/checkout@v3 + - name: Upload to pypi + run: | + cd python + cp ../README.md ../LICENSE . + pip install build + python3 -m build + pip install twine + python3 -m twine upload dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }} diff --git a/python/sglang/__init__.py b/python/sglang/__init__.py index 67af1419e73..8d7d0959c61 100644 --- a/python/sglang/__init__.py +++ b/python/sglang/__init__.py @@ -1,5 +1,3 @@ -__version__ = "0.1.24" - # SGL API Components from sglang.api import ( Runtime, @@ -32,6 +30,8 @@ from sglang.lang.backend.runtime_endpoint import RuntimeEndpoint from sglang.lang.backend.vertexai import VertexAI +from .version import __version__ + # public APIs management __all__ = [ "global_config", diff --git a/python/sglang/version.py b/python/sglang/version.py new file mode 100644 index 00000000000..e8438af387a --- /dev/null +++ b/python/sglang/version.py @@ -0,0 +1 @@ +__version__ = "0.1.24" From 5af03d22c35d3f11727e328c9d1be1f07fe9e730 Mon Sep 17 00:00:00 2001 From: zhyncs Date: Thu, 25 Jul 2024 18:01:20 +0800 Subject: [PATCH 2/2] chore: bump v0.1.25 --- python/pyproject.toml | 2 +- python/sglang/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index 8906755963d..2708373f8ad 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "sglang" -version = "0.1.24" +version = "0.1.25" description = "SGLang is yet another fast serving framework for large language models and vision language models." readme = "README.md" requires-python = ">=3.8" diff --git a/python/sglang/version.py b/python/sglang/version.py index e8438af387a..43a0e4ea792 100644 --- a/python/sglang/version.py +++ b/python/sglang/version.py @@ -1 +1 @@ -__version__ = "0.1.24" +__version__ = "0.1.25"