From 67ad4338e1016ff2aa31dbde7dd48432859eb6e5 Mon Sep 17 00:00:00 2001 From: Ke Bao Date: Sat, 25 Jan 2025 23:14:35 +0800 Subject: [PATCH] Update tag name for whl release (#3127) --- .github/workflows/release-whl-kernel.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-whl-kernel.yml b/.github/workflows/release-whl-kernel.yml index 1b2efaad7..08a820c2a 100644 --- a/.github/workflows/release-whl-kernel.yml +++ b/.github/workflows/release-whl-kernel.yml @@ -4,8 +4,12 @@ on: workflow_dispatch: inputs: tag_name: - required: true type: string + push: + branches: + - main + paths: + - sgl-kernel/version.py jobs: build-wheels: @@ -51,10 +55,20 @@ jobs: merge-multiple: true pattern: wheel-* + - name: Set tag name + id: set_tag_name + run: | + if [ -z "${{ inputs.tag_name }}" ]; then + TAG_NAME="v$(cat sgl-kernel/version.py | cut -d'"' -f2)" + echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT + else + echo "tag_name=${{ inputs.tag_name }}" >> $GITHUB_OUTPUT + fi + - name: Release uses: softprops/action-gh-release@v2 with: - tag_name: ${{ inputs.tag_name }} + tag_name: ${{ steps.set_tag_name.outputs.tag_name }} repository: sgl-project/whl token: ${{ secrets.WHL_TOKEN }} files: |