From 9dbea2f93a7b4394235675597ccf72c7c4514628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=9B=BD=E9=94=8B?= <18508478357@163.com> Date: Mon, 2 Feb 2026 16:50:41 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(ci):=20=E4=BF=AE=E5=A4=8D=20?= =?UTF-8?q?Release=20=E8=84=9A=E6=9C=AC=E4=B8=AD=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E5=8F=98=E9=87=8F=E5=BC=95=E7=94=A8=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修正构建脚本中判空检查使用了未定义变量 APP_NAME 的问题 --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2eebb8..c5ea023 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,11 +62,14 @@ jobs: # Find .app bundle APP_PATH=$(find . -maxdepth 1 -name "*.app" | head -n 1) - if [ -z "$APP_NAME" ]; then + if [ -z "$APP_PATH" ]; then echo "❌ 未找到 .app 应用包!" exit 1 fi + # Get pure name (e.g. GoNavi.app) + APP_NAME=$(basename "$APP_PATH") + # Ad-hoc codesign to prevent "Damaged" error (requires user to allow anyway, but valid structure) echo "🔏 正在进行 Ad-hoc 签名..." codesign --force --options runtime --deep --sign - "$APP_NAME"