From c0e59fa96d9b61f342f0ea5d38c89d83b3eddd13 Mon Sep 17 00:00:00 2001 From: Yakumo Hokori Date: Sat, 27 Sep 2025 21:37:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DGitHub=20Actions=E4=B8=ADshar?= =?UTF-8?q?p=E5=8C=85=E5=AE=89=E8=A3=85=E5=A4=B1=E8=B4=A5=E7=9A=84Python?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加Python 3.11环境设置以确保distutils可用 - 安装setuptools包提供必要的构建工具 - 解决macOS上node-gyp编译sharp时的模块缺失错误 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/publish.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index eec49e7..5999d3d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -45,6 +45,16 @@ jobs: node-version: lts/* cache: 'pnpm' + # 设置 Python 环境以解决 sharp 依赖问题 + - name: setup python + uses: actions/setup-python@v4 + with: + python-version: '3.11' # 使用 3.11 版本以确保 distutils 可用 + + # 安装 setuptools 以提供 distutils + - name: install setuptools + run: pip install setuptools + - name: install Rust stable uses: dtolnay/rust-toolchain@stable with: