From 90fd476c45987f8517d0989d3974a2fcba508660 Mon Sep 17 00:00:00 2001 From: shanshanzhong Date: Wed, 5 Nov 2025 18:25:33 -0800 Subject: [PATCH] =?UTF-8?q?ci(workflow):=20=E6=9B=B4=E6=96=B0=20Windows=20?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E5=B7=A5=E4=BD=9C=E6=B5=81=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 使用 Node.js 20.x 确保最新稳定补丁 - 添加 npm 缓存以加速构建 - 增加 Node.js 安装验证步骤 --- .github/workflows/build-windows.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 27df9b0..469132e 100755 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -17,7 +17,16 @@ jobs: - name: 🔧 设置 Node.js uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '20.x' # 使用 20.x 以确保最新稳定补丁 + cache: 'npm' # 启用缓存以加速并减少下载问题 + + - name: 🔍 验证 Node.js 安装 + run: | + echo "Node.js 版本: $(node --version)" + echo "npm 版本: $(npm --version)" + echo "PATH: $PATH" + which node || echo "❌ node 未在 PATH 中" + node --version || echo "❌ node 命令失败" - name: 📥 Checkout 代码 uses: actions/checkout@v4 @@ -32,7 +41,6 @@ jobs: cache: true cache-dependency-path: libcore/go.sum - - name: 🔧 安装 MinGW run: | sudo apt-get update @@ -143,4 +151,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: windows-release-build - path: build/windows/runner/Release/ + path: build/windows/runner/Release/ \ No newline at end of file