fix(ci): pnpm 版本对齐 11——pnpm 9 不识别 allowBuilds,esbuild 构建脚本被跳过
Build and Publish Commercial Web / build (push) Failing after 58s
Build and Publish Commercial Web / build (push) Failing after 58s
This commit is contained in:
@@ -112,9 +112,11 @@ jobs:
|
|||||||
TOOLDIR="$RUNNER_WORKSPACE/.lunar-toolchain"
|
TOOLDIR="$RUNNER_WORKSPACE/.lunar-toolchain"
|
||||||
if [ ! -x "$TOOLDIR/pnpm/bin/pnpm" ]; then
|
if [ ! -x "$TOOLDIR/pnpm/bin/pnpm" ]; then
|
||||||
rm -rf "$TOOLDIR/pnpm"
|
rm -rf "$TOOLDIR/pnpm"
|
||||||
|
# 版本与本地一致(pnpm 11):web/ 工作区的 allowBuilds 配置
|
||||||
|
# 是 pnpm 10.9+ 才支持的字段,pnpm 9 会导致 esbuild 构建脚本被忽略
|
||||||
# 亚洲 runner 优先走 npmmirror,失败回落官方源
|
# 亚洲 runner 优先走 npmmirror,失败回落官方源
|
||||||
npm install -g --prefix "$TOOLDIR/pnpm" --registry=https://registry.npmmirror.com 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@9
|
|| npm install -g --prefix "$TOOLDIR/pnpm" --registry=https://registry.npmjs.org pnpm@11
|
||||||
fi
|
fi
|
||||||
echo "PATH=$TOOLDIR/pnpm/bin:$PATH" >> "$GITEA_ENV"
|
echo "PATH=$TOOLDIR/pnpm/bin:$PATH" >> "$GITEA_ENV"
|
||||||
"$TOOLDIR/pnpm/bin/pnpm" --version
|
"$TOOLDIR/pnpm/bin/pnpm" --version
|
||||||
|
|||||||
Reference in New Issue
Block a user