@@ -285,45 +285,7 @@ jobs:
285285 prerelease : false
286286 args : ${{ matrix.args }}
287287
288- - name : Notarize DMG (macOS only)
289- if : matrix.platform == 'macos-latest'
290- env :
291- APPLE_ID : ${{ secrets.APPLE_ID }}
292- APPLE_PASSWORD : ${{ secrets.APPLE_PASSWORD }}
293- APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
294- run : |
295- # 获取构建的 DMG 路径
296- TARGET_DIR="${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || matrix.args == '--target x86_64-apple-darwin' && 'x86_64-apple-darwin' || '' }}"
297- 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"
298- APP_PATH="src-tauri/target/${TARGET_DIR}/release/bundle/macos/NoteGen.app"
299-
300- echo "🔍 检查 DMG 路径: $DMG_PATH"
301- echo "🔍 检查 APP 路径: $APP_PATH"
302-
303- if [ -f "$DMG_PATH" ]; then
304- echo "🔐 开始公证 DMG: $DMG_PATH"
305-
306- # 使用 xcrun notarytool 进行公证 DMG
307- xcrun notarytool submit "$DMG_PATH" \
308- --apple-id "$APPLE_ID" \
309- --password "$APPLE_PASSWORD" \
310- --team-id "$APPLE_TEAM_ID" \
311- --wait \
312- --output-format json || echo "⚠️ 公证失败,但代码签名已完成"
313-
314- # 获取公证结果并附加票据到 APP
315- if [ -f "$APP_PATH" ]; then
316- echo "📎 附加公证票据到 APP"
317- xcrun stapler staple "$APP_PATH"
318- fi
319-
320- echo "✅ 公证完成"
321- else
322- echo "❌ 找不到 DMG 文件: $DMG_PATH"
323- echo "📁 可用文件列表:"
324- find src-tauri/target -name "*.dmg" -o -name "*.app" 2>/dev/null || true
325- fi
326-
288+
327289 - name : Generate release tag
328290 id : save_tag
329291 if : matrix.platform == 'ubuntu-24.04'
0 commit comments