File tree Expand file tree Collapse file tree 3 files changed +101
-1
lines changed Expand file tree Collapse file tree 3 files changed +101
-1
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -eu pipefail
3+
4+ # --- SCHEDULE TRIGGER ---
5+ if [[ " $GH_EVENT_NAME " == " schedule" ]]; then
6+ echo " Trigger: Schedule - Generating nightly build"
7+
8+ # --- Get Base Version from Tag ---
9+ echo " Fetching latest tags..."
10+ git fetch --tags --force
11+ echo " Finding the latest stable version tag (vX.Y.Z)..."
12+ LATEST_STABLE_TAG=$( git tag --sort=-v:refname | grep -E ' ^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)
13+ if [[ -z " $LATEST_STABLE_TAG " ]]; then
14+ echo " Warning: No stable tag found."
15+ exit 1
16+ else
17+ BASE_VERSION=${LATEST_STABLE_TAG# v}
18+ fi
19+ echo " Using BASE_VERSION=${BASE_VERSION} "
20+
21+ # --- Generate Nightly Version ---
22+ DATETIME_STR=$( date -u +%Y%m%d%H%M)
23+ VERSION=" ${BASE_VERSION} .dev${DATETIME_STR} "
24+
25+ # --- PUSH TAG TRIGGER ---
26+ elif [[ " $GH_EVENT_NAME " == " push" && " $GH_REF " == refs/tags/* ]]; then
27+ echo " Trigger: Push Tag - Generating stable build"
28+ TAG_NAME=" $GH_REF_NAME "
29+ VERSION=${TAG_NAME# v}
30+
31+ else
32+ echo " Error: Unknown or unsupported trigger."
33+ exit 1
34+ fi
35+
36+ # --- output ---
37+ echo " Final determined values: VERSION=${VERSION} "
38+ echo " VERSION=${VERSION} " >> " $GITHUB_OUTPUT "
Original file line number Diff line number Diff line change 1+ name : Publish Package to PyPI
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v[0-9]+.[0-9]+.[0-9]+*'
7+ schedule :
8+ - cron : ' 0 8 * * *'
9+
10+ jobs :
11+ pypi_publish :
12+ name : Build and Publish
13+ runs-on : ubuntu-latest
14+
15+ permissions :
16+ id-token : write
17+ contents : read
18+
19+ steps :
20+ - name : Checkout Code
21+ uses : actions/checkout@v4
22+ with :
23+ fetch-depth : 0
24+
25+ - name : Check if tag is on main branch
26+ if : github.event_name == 'push'
27+ run : |
28+ echo "Checking if tag ${{ github.ref_name }} is on main branch..."
29+ if git branch -r --contains ${{ github.ref_name }} | grep -q "origin/main"; then
30+ echo "Tag is on origin/main. Proceeding with release."
31+ else
32+ echo "ERROR Tag ${{ github.ref_name }} is not on origin/main."
33+ echo "This release will be aborted to prevent publishing from a non-main branch."
34+ exit 1
35+ fi
36+
37+ - name : Set up Python
38+ uses : actions/setup-python@v5
39+ with :
40+ python-version : ' 3.x'
41+
42+ - name : Determine Version
43+ id : vars
44+ env :
45+ GH_EVENT_NAME : ${{ github.event_name }}
46+ GH_REF_NAME : ${{ github.ref_name }}
47+ GH_REF : ${{ github.ref }}
48+ run : bash .github/scripts/determine_release_vars.sh
49+
50+ - name : Install dependencies (build)
51+ run :
52+ python3 -m pip install build
53+
54+ - name : Build package (sdist and wheel)
55+ env :
56+ VLLM_VERSION_OVERRIDE : ${{ steps.vars.outputs.VERSION }}
57+ run : python3 -m build
58+
59+ - name : Publish package distributions to PyPI
60+ uses : pypa/gh-action-pypi-publish@release/v1
61+
62+ - name : Publish completed message
63+ run : echo "---Build and publish completed successfully.---"
Original file line number Diff line number Diff line change 11include requirements.txt
22include README.md
3- include version.py
43include tpu_inference/models/jax/utils/quantization/configs/*.yaml
You can’t perform that action at this time.
0 commit comments