From f907f7fe5ebfc73dcbdbdc3ca4b509533f5d0313 Mon Sep 17 00:00:00 2001 From: suyao Date: Sun, 15 Jun 2025 19:50:38 +0800 Subject: [PATCH] chore: enhance Windows build support in release workflow - Added support for Windows 11 ARM architecture in the release workflow. - Introduced a new step to install dependencies specific to Windows 11 ARM. - Updated the canvas rebuild step to conditionally execute for Windows 11 ARM alongside existing Windows builds. --- .github/workflows/release.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8b45e1bcd..da8313387 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: - os: [macos-latest, windows-latest, ubuntu-latest] + os: [macos-latest, windows-latest, ubuntu-latest, windows-11-arm] fail-fast: false steps: @@ -63,6 +63,13 @@ jobs: .\libjpeg.exe /S npm install -g node-gyp@8 npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"} + - name: windows-11-arm dependencies fix + if: matrix.os == 'windows-11-arm' + run: | + Invoke-WebRequest "https://ftp.gnome.org/pub/GNOME/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip" -OutFile "gtk.zip" + Expand-Archive gtk.zip -DestinationPath "C:\GTK" + Invoke-WebRequest "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.1.1/libjpeg-turbo-3.1.1-vc-arm64.exe" -OutFile "libjpeg.exe" -UserAgent NativeHost + .\libjpeg.exe /S - name: Install corepack run: corepack enable && corepack prepare yarn@4.6.0 --activate @@ -118,12 +125,12 @@ jobs: cd node_modules/canvas && node-gyp rebuild --arch=x64 && cd ../.. - name: Build canvas for Windows ARM64 - if: matrix.os == 'windows-latest' + if: matrix.os == 'windows-11-arm' run: | cd node_modules/canvas && node-gyp rebuild --arch=arm64 && cd ../.. - name: Build Windows - if: matrix.os == 'windows-latest' + if: matrix.os == 'windows-latest' || matrix.os == 'windows-11-arm' run: | yarn build:npm windows yarn build:win