feat: add fake tag (#770)

This commit is contained in:
Yineng Zhang
2024-07-28 02:22:22 +10:00
committed by GitHub
parent f64b2a9bc0
commit de854fb5c5

35
.github/workflows/fake-tag.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: fake tag
on:
push:
branches:
- main
paths:
- "python/sglang/version.py"
workflow_dispatch:
permissions:
contents: write
jobs:
publish:
if: github.repository == 'sgl-project/sglang'
runs-on: ubuntu-latest
environment: 'prod'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get version
id: get_version
run: |
version=$(cat python/sglang/version.py | cut -d'"' -f2)
echo "TAG=v$version" >> $GITHUB_OUTPUT
- name: Create and push fake tag
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
run: |
git config user.name zhyncs
git config user.email me@zhyncs.com
git checkout -b ${{ steps.get_version.outputs.TAG }}
git push --set-upstream origin ${{ steps.get_version.outputs.TAG }}