ci: 新增仅构建 Windows 的 workflow (build-windows.yml)
Build Windows Only / build-windows (push) Successful in 1m53s
Build Windows Only / build-windows (push) Successful in 1m53s
手动 workflow_dispatch 或推 winbuild* tag 触发,复用 provision/compile-windows.sh, 产物经 upload-artifact 传到 Forgejo,不触发完整 deploy。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -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/
|
||||||
Reference in New Issue
Block a user