From 4e03c489b0083dbe6006fbba73dced8abb6eb4b6 Mon Sep 17 00:00:00 2001 From: suyao Date: Sun, 15 Jun 2025 04:37:05 +0800 Subject: [PATCH] chore: enhance canvas rebuild steps for Windows in release workflow - Updated the canvas rebuild step to specify architecture for Windows x64 and added a new step for Windows ARM64. - Ensures compatibility with both x64 and ARM64 architectures during the build process. --- .github/workflows/release.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 46133e767..8b45e1bcd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -112,10 +112,15 @@ jobs: NODE_OPTIONS: --max-old-space-size=8192 MAIN_VITE_MINERU_API_KEY: ${{ vars.MAIN_VITE_MINERU_API_KEY }} - - name: Rebuild canvas for Windows + - name: Build canvas for Windows x64 if: matrix.os == 'windows-latest' run: | - cd node_modules/canvas && node-gyp rebuild && cd ../.. + cd node_modules/canvas && node-gyp rebuild --arch=x64 && cd ../.. + + - name: Build canvas for Windows ARM64 + if: matrix.os == 'windows-latest' + run: | + cd node_modules/canvas && node-gyp rebuild --arch=arm64 && cd ../.. - name: Build Windows if: matrix.os == 'windows-latest'