From adc4a4ff2c0c6038b23816292648a6ba0b8946ca Mon Sep 17 00:00:00 2001 From: EUForest Date: Mon, 24 Nov 2025 18:23:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20GitHub=20Actions=20?= =?UTF-8?q?=E8=AF=AD=E6=B3=95=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 合并重复的 push 触发器 - 修复 YAML 语法问题 - 确保标签推送时自动创建 Release --- .github/workflows/deploy-linux.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-linux.yml b/.github/workflows/deploy-linux.yml index 2029458..9af4378 100644 --- a/.github/workflows/deploy-linux.yml +++ b/.github/workflows/deploy-linux.yml @@ -3,7 +3,6 @@ name: Build Linux Binary on: push: branches: [ main, master ] - push: tags: - 'v*' workflow_dispatch: @@ -49,6 +48,8 @@ jobs: run: | if [ "${{ github.event_name }}" = "release" ]; then VERSION=${GITHUB_REF#refs/tags/} + elif [ "${{ github.event_name }}" = "push" ] && [ "${{ github.ref_type }}" = "tag" ]; then + VERSION=${GITHUB_REF#refs/tags/} elif [ -n "${{ github.event.inputs.version }}" ]; then VERSION="${{ github.event.inputs.version }}" else @@ -103,7 +104,7 @@ jobs: --title "PPanel Server ${{ env.VERSION }}" \ --notes "Release ${{ env.VERSION }}" \ --latest - elif [ "${{ github.event_name }}" = "push" ] && [ "${{ github.ref_type }}" = "tag" ]; then + elif [ "${{ github.event_name }}" = "push" ] && startsWith(github.ref, 'refs/tags/'); then echo "Creating release for tag ${{ env.VERSION }}" gh release create ${{ env.VERSION }} \ --title "PPanel Server ${{ env.VERSION }}" \