From 1c4584abd1bab9350479fb7f4d74a9a10f7ff9a1 Mon Sep 17 00:00:00 2001 From: codexu <461229187@qq.com> Date: Sat, 3 Jan 2026 17:23:54 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E5=85=AC?= =?UTF-8?q?=E8=AF=81=E6=AD=A5=E9=AA=A4=EF=BC=8C=E6=94=B9=E4=B8=BA=E5=85=AC?= =?UTF-8?q?=E8=AF=81=20DMG=20=E6=96=87=E4=BB=B6=E5=B9=B6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 483a3405f..b2f482e73 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -285,35 +285,44 @@ jobs: prerelease: false args: ${{ matrix.args }} - - name: Notarize app (macOS only) + - name: Notarize DMG (macOS only) if: matrix.platform == 'macos-latest' env: APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} run: | - # 获取构建的 app 路径 - APP_PATH="src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || matrix.args == '--target x86_64-apple-darwin' && 'x86_64-apple-darwin' || '' }}/release/bundle/macos/NoteGen.app" + # 获取构建的 DMG 路径 + TARGET_DIR="${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || matrix.args == '--target x86_64-apple-darwin' && 'x86_64-apple-darwin' || '' }}" + DMG_PATH="src-tauri/target/${TARGET_DIR}/release/bundle/dmg/NoteGen_0.23.4_${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64' || matrix.args == '--target x86_64-apple-darwin' && 'x64' || '' }}.dmg" + APP_PATH="src-tauri/target/${TARGET_DIR}/release/bundle/macos/NoteGen.app" - if [ -f "$APP_PATH" ]; then - echo "🔐 开始公证 $APP_PATH" + echo "🔍 检查 DMG 路径: $DMG_PATH" + echo "🔍 检查 APP 路径: $APP_PATH" + + if [ -f "$DMG_PATH" ]; then + echo "🔐 开始公证 DMG: $DMG_PATH" - # 使用 xcrun notarytool 进行公证(更快) + # 使用 xcrun notarytool 进行公证 DMG # 设置 10 分钟超时 - timeout 600 xcrun notarytool submit "$APP_PATH" \ + timeout 600 xcrun notarytool submit "$DMG_PATH" \ --apple-id "$APPLE_ID" \ --password "$APPLE_PASSWORD" \ --team-id "$APPLE_TEAM_ID" \ --wait \ --output-format json || echo "⚠️ 公证超时,但代码签名已完成" - # 获取公证结果并附加票据 - echo "📎 附加公证票据" - xcrun stapler staple "$APP_PATH" + # 获取公证结果并附加票据到 APP + if [ -f "$APP_PATH" ]; then + echo "📎 附加公证票据到 APP" + xcrun stapler staple "$APP_PATH" + fi echo "✅ 公证完成" else - echo "❌ 找不到应用文件: $APP_PATH" + echo "❌ 找不到 DMG 文件: $DMG_PATH" + echo "📁 可用文件列表:" + find src-tauri/target -name "*.dmg" -o -name "*.app" 2>/dev/null || true fi - name: Generate release tag From 271d8d4ee7208fd28a87f9ff9dfe0a3dce2e1ccb Mon Sep 17 00:00:00 2001 From: codexu <461229187@qq.com> Date: Sat, 3 Jan 2026 17:35:59 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=20DMG=20=E5=85=AC?= =?UTF-8?q?=E8=AF=81=E7=9A=84=E8=B6=85=E6=97=B6=E9=99=90=E5=88=B6=E5=B9=B6?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b2f482e73..4a9103c7e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -304,13 +304,12 @@ jobs: echo "🔐 开始公证 DMG: $DMG_PATH" # 使用 xcrun notarytool 进行公证 DMG - # 设置 10 分钟超时 - timeout 600 xcrun notarytool submit "$DMG_PATH" \ + xcrun notarytool submit "$DMG_PATH" \ --apple-id "$APPLE_ID" \ --password "$APPLE_PASSWORD" \ --team-id "$APPLE_TEAM_ID" \ --wait \ - --output-format json || echo "⚠️ 公证超时,但代码签名已完成" + --output-format json || echo "⚠️ 公证失败,但代码签名已完成" # 获取公证结果并附加票据到 APP if [ -f "$APP_PATH" ]; then From bb5073b04d1cc9ddcfeedab13976e09d4f1f1a6c Mon Sep 17 00:00:00 2001 From: codexu <461229187@qq.com> Date: Sat, 3 Jan 2026 18:59:46 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=20macOS=20DMG=20?= =?UTF-8?q?=E5=85=AC=E8=AF=81=E6=AD=A5=E9=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 40 +---------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4a9103c7e..bcc2806b3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -285,45 +285,7 @@ jobs: prerelease: false args: ${{ matrix.args }} - - name: Notarize DMG (macOS only) - if: matrix.platform == 'macos-latest' - env: - APPLE_ID: ${{ secrets.APPLE_ID }} - APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} - APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} - run: | - # 获取构建的 DMG 路径 - TARGET_DIR="${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || matrix.args == '--target x86_64-apple-darwin' && 'x86_64-apple-darwin' || '' }}" - DMG_PATH="src-tauri/target/${TARGET_DIR}/release/bundle/dmg/NoteGen_0.23.4_${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64' || matrix.args == '--target x86_64-apple-darwin' && 'x64' || '' }}.dmg" - APP_PATH="src-tauri/target/${TARGET_DIR}/release/bundle/macos/NoteGen.app" - - echo "🔍 检查 DMG 路径: $DMG_PATH" - echo "🔍 检查 APP 路径: $APP_PATH" - - if [ -f "$DMG_PATH" ]; then - echo "🔐 开始公证 DMG: $DMG_PATH" - - # 使用 xcrun notarytool 进行公证 DMG - xcrun notarytool submit "$DMG_PATH" \ - --apple-id "$APPLE_ID" \ - --password "$APPLE_PASSWORD" \ - --team-id "$APPLE_TEAM_ID" \ - --wait \ - --output-format json || echo "⚠️ 公证失败,但代码签名已完成" - - # 获取公证结果并附加票据到 APP - if [ -f "$APP_PATH" ]; then - echo "📎 附加公证票据到 APP" - xcrun stapler staple "$APP_PATH" - fi - - echo "✅ 公证完成" - else - echo "❌ 找不到 DMG 文件: $DMG_PATH" - echo "📁 可用文件列表:" - find src-tauri/target -name "*.dmg" -o -name "*.app" 2>/dev/null || true - fi - + - name: Generate release tag id: save_tag if: matrix.platform == 'ubuntu-24.04'