fix(ci): fix Node.js ARM64 musl build - use apk mode instead of cross

- V2 build now uses Alpine nodejs-current package (v23.x)
- V1 build now uses Alpine nodejs LTS package (v22.x)
- Add PKG_TYPE environment variable to select package type
- Update release notes to reflect new build approach

The cross-compilation mode failed because Node.js official glibc binary
cannot be converted to musl via patchelf due to glibc-specific dynamic
linker dependencies.
This commit is contained in:
10000ge10000
2026-03-17 02:30:34 +08:00
parent 1df1a4170b
commit 9d0012629b
2 changed files with 22 additions and 10 deletions

View File

@@ -26,10 +26,19 @@ echo " Target version: v${NODE_VER}"
echo " Build mode: ${BUILD_MODE}"
# ── apk 模式: 使用 Alpine 仓库的 Node.js ──
# PKG_TYPE: lts (nodejs) 或 current (nodejs-current)
build_apk() {
echo ""
echo "=== Building with Alpine apk mode ==="
apk add --no-cache nodejs npm xz icu-data-full patchelf
# 根据请求的版本选择包
if [ "${PKG_TYPE}" = "current" ]; then
echo "Using nodejs-current package for newer version"
apk add --no-cache nodejs-current npm xz icu-data-full patchelf
else
echo "Using nodejs (LTS) package"
apk add --no-cache nodejs npm xz icu-data-full patchelf
fi
ACTUAL_VER=$(node --version | sed 's/^v//')
echo "Alpine Node.js version: v${ACTUAL_VER} (requested: v${NODE_VER})"