diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6c2bd5aa..4cf47e40 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -226,6 +226,38 @@ jobs: args: ${{ matrix.args }} includeUpdaterJson: true + # Tauri's bundler signs the .app and notarizes it, but the .dmg wrapper + # ships unnotarized. Gatekeeper rejects that on macOS 15 Sequoia (caught + # by Homebrew Cask CI) and causes "app isn't signed" dialogs on older + # Intel Macs when Apple's notarization servers are slow (see issue #509). + # Submit the .dmg to notarytool, staple the ticket, and overwrite the + # release asset uploaded by tauri-action. + - name: Notarize and staple DMG (macOS) + if: matrix.platform == 'macos-latest' || matrix.platform == 'macos-15-intel' + env: + APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY }} + APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -euo pipefail + KEY_PATH="$HOME/.appstoreconnect/private_keys/AuthKey_${APPLE_API_KEY_ID}.p8" + TARGET=$(echo "${{ matrix.args }}" | sed -n 's/.*--target \([a-z0-9_-]*\).*/\1/p') + DMG_DIR="tauri/src-tauri/target/${TARGET}/release/bundle/dmg" + shopt -s nullglob + for dmg in "${DMG_DIR}"/*.dmg; do + echo "::group::Notarize $(basename "$dmg")" + xcrun notarytool submit "$dmg" \ + --key "$KEY_PATH" \ + --key-id "$APPLE_API_KEY_ID" \ + --issuer "$APPLE_API_ISSUER" \ + --wait --timeout 20m + xcrun stapler staple "$dmg" + spctl -a -t open --context context:primary-signature -vv "$dmg" + gh release upload "${GITHUB_REF_NAME}" "$dmg" --clobber \ + --repo "${GITHUB_REPOSITORY}" + echo "::endgroup::" + done + build-cuda-windows: runs-on: windows-latest permissions: