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.
This commit is contained in:
suyao
2025-06-15 19:50:38 +08:00
parent f32ccd0fba
commit f907f7fe5e
+10 -3
View File
@@ -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