fix(ci): pnpm 版本对齐 11——pnpm 9 不识别 allowBuilds,esbuild 构建脚本被跳过
Build and Publish Commercial Web / build (push) Failing after 58s

This commit is contained in:
gouki
2026-10-21 08:43:17 +00:00
parent 7c7880bbd8
commit 98d6a67a5a
+4 -2
View File
@@ -112,9 +112,11 @@ jobs:
TOOLDIR="$RUNNER_WORKSPACE/.lunar-toolchain"
if [ ! -x "$TOOLDIR/pnpm/bin/pnpm" ]; then
rm -rf "$TOOLDIR/pnpm"
# 版本与本地一致(pnpm 11):web/ 工作区的 allowBuilds 配置
# 是 pnpm 10.9+ 才支持的字段,pnpm 9 会导致 esbuild 构建脚本被忽略
# 亚洲 runner 优先走 npmmirror,失败回落官方源
npm install -g --prefix "$TOOLDIR/pnpm" --registry=https://registry.npmmirror.com pnpm@9 \
|| npm install -g --prefix "$TOOLDIR/pnpm" --registry=https://registry.npmjs.org pnpm@9
npm install -g --prefix "$TOOLDIR/pnpm" --registry=https://registry.npmmirror.com pnpm@11 \
|| npm install -g --prefix "$TOOLDIR/pnpm" --registry=https://registry.npmjs.org pnpm@11
fi
echo "PATH=$TOOLDIR/pnpm/bin:$PATH" >> "$GITEA_ENV"
"$TOOLDIR/pnpm/bin/pnpm" --version