From c3c5ff442d0dbad633a59cd6d9dcd21852677942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=B1=BC=E5=BC=80=E5=8F=91?= Date: Tue, 19 May 2026 12:50:55 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20unset=20TAURI=5FSIGNING=5FPRIVATE=5FKEY?= =?UTF-8?q?=20=E9=81=BF=E5=85=8D=E4=B8=8E=20-f=20=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 24d4c00..0285527 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -101,8 +101,10 @@ jobs: run: | DMG_PATH=$(ls src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg | head -1) rm -f "${DMG_PATH}.sig" - # 用 python 将私钥写入文件,避免 shell heredoc 缩进问题 + # 用 python 将私钥写入文件,避免 shell 多行环境变量传递问题 + # 注意:清空 TAURI_SIGNING_PRIVATE_KEY 环境变量,避免与 -f 参数冲突 python3 -c "import os; open('/tmp/private.key','w').write(os.environ['TAURI_SIGNING_PRIVATE_KEY'].strip())" + unset TAURI_SIGNING_PRIVATE_KEY npx tauri signer sign -f /tmp/private.key -p "$TAURI_SIGNING_PRIVATE_KEY_PASSWORD" "$DMG_PATH" rm -f /tmp/private.key env: