From 2a75b3a8b6656209791e469cf95b77257e069404 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Sat, 13 Jun 2026 20:46:55 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=96=B0=E5=A2=9E=E4=BB=85=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=20Windows=20=E7=9A=84=20workflow=20(build-windows.yml?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 手动 workflow_dispatch 或推 winbuild* tag 触发,复用 provision/compile-windows.sh, 产物经 upload-artifact 传到 Forgejo,不触发完整 deploy。 Co-Authored-By: Claude Opus 4.8 --- .gitea/workflows/build-windows.yml | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .gitea/workflows/build-windows.yml diff --git a/.gitea/workflows/build-windows.yml b/.gitea/workflows/build-windows.yml new file mode 100644 index 0000000..0f0d39f --- /dev/null +++ b/.gitea/workflows/build-windows.yml @@ -0,0 +1,42 @@ +name: Build Windows Only + +# 仅构建 Windows 桌面版(不触发完整 deploy)。 +# 触发方式: +# - 手动 workflow_dispatch(可填 ver) +# - 推送 winbuild* 轻量 tag(如 winbuild1),不与 deploy.yml 的 v* tag 冲突 +on: + workflow_dispatch: + inputs: + ver: + description: '版本号 (如 v1.0.4)' + required: false + default: 'v1.0.4' + type: string + push: + tags: + - 'winbuild*' + +jobs: + build-windows: + runs-on: windows + env: + GOPROXY: https://goproxy.cn,direct + PUB_HOSTED_URL: https://pub.flutter-io.cn + FLUTTER_STORAGE_BASE_URL: https://storage.flutter-io.cn + + steps: + - uses: actions/checkout@v4 + + - name: Provision (idempotent — auto-runs if host not initialized) + shell: bash + run: sh scripts/ci/provision-windows.sh + + - name: Compile (Flutter Windows) + shell: bash + run: sh scripts/ci/compile-windows.sh "${{ inputs.ver || 'v1.0.4' }}" + + - name: Upload windows artifact + uses: actions/upload-artifact@v3 + with: + name: jiu-windows + path: dist/