From 5629da957129858f8f68abb5417dba38007e04bd Mon Sep 17 00:00:00 2001 From: 7418 <7418@openclaw.ai> Date: Tue, 3 Mar 2026 11:45:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20arm64=20=E6=89=93=E5=8C=85=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E6=94=B9=E7=94=A8=20if/else=20=E5=88=86=E6=94=AF?= =?UTF-8?q?=E6=9B=BF=E4=BB=A3=20EXTRA=5FARGS=20=E6=95=B0=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bash 数组展开在 GitHub Actions 中不稳定, 改为 NOTARIZE 变量 + if/else 直接调用不同命令行。 Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/build.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec04a22..13a6c92 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -167,18 +167,24 @@ jobs: run: | set -euo pipefail - EXTRA_ARGS=() - if [[ "${{ steps.mac_mode.outputs.notarize }}" != "true" ]]; then - EXTRA_ARGS=(-c.mac.notarize=false) - fi + NOTARIZE="${{ steps.mac_mode.outputs.notarize }}" for i in 1 2 3; do - echo "electron-builder arm64 attempt $i/3 (notarize=${{ steps.mac_mode.outputs.notarize }})" - if npx electron-builder --mac --arm64 --config electron-builder.yml "${EXTRA_ARGS[@]}" --publish never; then + echo "electron-builder arm64 attempt $i/3 (notarize=$NOTARIZE)" + + if [[ "$NOTARIZE" == "true" ]]; then + npx electron-builder --mac --arm64 --config electron-builder.yml --publish never + else + npx electron-builder --mac --arm64 --config electron-builder.yml -c.mac.notarize=false --publish never + fi + + if [ $? -eq 0 ]; then exit 0 fi + if [ "$i" -lt 3 ]; then sleep $((i * 60)); fi done + exit 1 # Restore x64 artifacts alongside arm64 output