From 870396ac67937627c7795d457a154f6005ec6652 Mon Sep 17 00:00:00 2001 From: Jamie Pine Date: Mon, 20 Apr 2026 23:19:44 -0700 Subject: [PATCH] fix(release): fail loudly when no DMG is found to notarize Empty glob + nullglob was silently skipping the loop body, so if Tauri's bundler output path changed we'd re-publish the unnotarized DMGs with a green CI. Assert the glob matched at least one file. --- .github/workflows/release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4cf47e40..3f0d0398 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -244,7 +244,12 @@ jobs: 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 + dmgs=("${DMG_DIR}"/*.dmg) + if [ ${#dmgs[@]} -eq 0 ]; then + echo "::error::No DMGs found in ${DMG_DIR} — tauri bundler output path may have changed" + exit 1 + fi + for dmg in "${dmgs[@]}"; do echo "::group::Notarize $(basename "$dmg")" xcrun notarytool submit "$dmg" \ --key "$KEY_PATH" \