From c5803954c7996aee51abc2249e66d7c26ae925ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ACT=E4=B8=B6=E6=B5=81=E6=98=9F=E9=9B=A8?= <1340145680@qq.com> Date: Sun, 5 Apr 2026 11:15:45 +0800 Subject: [PATCH] =?UTF-8?q?workflows=E6=B7=BB=E5=8A=A0=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index af9da84..84d7c14 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,13 +11,19 @@ on: required: false type: boolean default: false + skipRelease: + description: "跳过发布(仅构建测试)" + required: false + type: boolean + default: false env: NODE_VERSION: "24" + SKIP_RELEASE: ${{ inputs.skipRelease || false }} jobs: # ==================== Windows 构建 ==================== - 构建-Windows: + build-Windows: strategy: fail-fast: false matrix: @@ -88,7 +94,7 @@ jobs: retention-days: 30 # ==================== macOS 构建 ==================== - 构建-macOS: + build-macOS: strategy: fail-fast: false matrix: @@ -171,7 +177,7 @@ jobs: retention-days: 30 # ==================== Linux 构建 ==================== - 构建-Linux: + build-Linux: runs-on: ubuntu-latest name: 构建 Linux (x64) @@ -228,11 +234,11 @@ jobs: retention-days: 30 # ==================== 发布 ==================== - 发布: - needs: [构建-Windows, 构建-macOS, 构建-Linux] + release: + needs: [build-Windows, build-macOS, build-Linux] runs-on: ubuntu-latest name: 发布到 GitHub - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') && inputs.skipRelease != true permissions: contents: write