From 145832093e863a58ff3d886588ea25dfce13c344 Mon Sep 17 00:00:00 2001 From: Rust Date: Mon, 27 Oct 2025 23:41:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E5=A2=9E=E5=BC=BA=20Windows=20?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E4=B8=AD=E7=9A=84=20build=5Frunner=20?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 build_runner 步骤独立出来 - 添加 PowerShell 文件存在性检查 - 如果生成的文件不存在则立即失败 - 提供详细的诊断日志 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/build-multiplatform.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index e092818..3c9ae82 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -391,8 +391,30 @@ jobs: - name: 📦 安装 Flutter 依赖 run: | flutter pub get + + - name: 🔧 生成代码文件 (build_runner) + run: | + echo "🔧 开始运行 build_runner..." flutter pub run build_runner build --delete-conflicting-outputs + echo "" + echo "✅ build_runner 完成,检查生成的文件..." + + if (Test-Path "lib\singbox\model\singbox_status.freezed.dart") { + echo "✅ singbox_status.freezed.dart 已生成" + } else { + echo "❌ singbox_status.freezed.dart 未生成" + exit 1 + } + + if (Test-Path "lib\singbox\service\singbox_service_provider.g.dart") { + echo "✅ singbox_service_provider.g.dart 已生成" + } else { + echo "❌ singbox_service_provider.g.dart 未生成" + exit 1 + } + shell: pwsh + - name: 🔨 构建 Windows (Release) run: | flutter build windows --release