build(web-ui): fix rollup failing (#4687)

This commit is contained in:
Coia Prant 2026-02-09 04:30:40 +08:00 committed by GitHub
commit 8aed1a82c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 38 additions and 9 deletions

View file

@ -71,7 +71,6 @@ jobs:
"mingw-w64-${TOOLCHAIN}-graphviz"
"mingw-w64-${TOOLCHAIN}-miniupnpc"
"mingw-w64-${TOOLCHAIN}-nlohmann-json"
"mingw-w64-${TOOLCHAIN}-nodejs"
"mingw-w64-${TOOLCHAIN}-onevpl"
"mingw-w64-${TOOLCHAIN}-openssl"
"mingw-w64-${TOOLCHAIN}-opus"
@ -82,6 +81,7 @@ jobs:
dependencies+=(
"mingw-w64-${TOOLCHAIN}-MinHook"
"mingw-w64-${TOOLCHAIN}-nsis"
"mingw-w64-${TOOLCHAIN}-nodejs"
)
fi
@ -146,6 +146,28 @@ jobs:
with:
dotnet-version: '10.x'
- name: Setup NodeJS
# Clang compiled NodeJS has issues when running rollup webpack
if: matrix.msystem != 'ucrt64'
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 'lts/*'
- name: NodeJS Path
if: matrix.msystem != 'ucrt64'
shell: pwsh
run: |
# get NodeJS PATH
$NODEJS_BINARY_PATH = (Get-Command node).Source
$NODEJS_PATH = Split-Path -Path "$NODEJS_BINARY_PATH" -Parent
# setup environment variables
echo "NODEJS_PATH=$NODEJS_PATH" >> $env:GITHUB_ENV
# step output
echo "nodejs-path=$NODEJS_PATH"
echo "nodejs-path=$NODEJS_PATH" >> $env:GITHUB_OUTPUT
- name: Setup python
id: setup-python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
@ -166,10 +188,19 @@ jobs:
- name: Build Windows
shell: msys2 {0}
env:
# MSYSTEM is a built-in environment variable of MSYS2.
# Do not use this environment variable name.
MATRIX_MSYSTEM: ${{ matrix.msystem }}
BRANCH: ${{ github.head_ref || github.ref_name }}
BUILD_VERSION: ${{ inputs.release_version }}
COMMIT: ${{ inputs.release_commit }}
run: |
# setup NodeJS PATH
if [[ "${MATRIX_MSYSTEM}" != "ucrt64" ]]; then
NODEJS_PATH=$(cygpath "$NODEJS_PATH")
export PATH="$PATH:$NODEJS_PATH"
fi
mkdir -p build
cmake \
-B build \