From e5c16b349766cdfdb658e7b46306c05ca26c940e Mon Sep 17 00:00:00 2001
From: XiaoDaiGua-Ray <443547225@qq.com>
Date: Thu, 2 May 2024 10:29:33 +0800
Subject: [PATCH] update: update workflows

---
 .github/workflows/push-build.yaml | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/push-build.yaml b/.github/workflows/push-build.yaml
index 280c9791..a750a529 100644
--- a/.github/workflows/push-build.yaml
+++ b/.github/workflows/push-build.yaml
@@ -8,7 +8,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        node-version: [18.18.2, 20.12.0] # 修改这里以包含所需的 Node.js 版本
+        node-version: [18.18.2, 20.12.0] # 指定 Node.js 版本
         os: [ubuntu-latest, windows-latest, macos-latest]
         experimental: [true]
 
@@ -21,6 +21,23 @@ jobs:
         with:
           node-version: ${{ matrix.node-version }}
 
+      - name: Install system dependencies for canvas (macOS only)
+        if: runner.os == 'macOS'
+        run: |
+          brew update
+          brew install pkg-config cairo pango libpng jpeg giflib
+
+      - name: Install node-pre-gyp and node-gyp
+        run: |
+          npm install -g node-pre-gyp
+          npm install -g node-gyp
+
+      - name: Install Python and distutils (macOS only)
+        if: runner.os == 'macOS'
+        run: |
+          python3 -m ensurepip
+          python3 -m pip install -U distutils
+
       - uses: pnpm/action-setup@v2
         name: Install pnpm
         with: