diff --git a/.github/workflows/dev-daily-fixed.yml b/.github/workflows/dev-daily-fixed.yml index d90ea6b..15f5450 100644 --- a/.github/workflows/dev-daily-fixed.yml +++ b/.github/workflows/dev-daily-fixed.yml @@ -105,9 +105,13 @@ jobs: - name: Package macOS arm64 dev artifacts shell: bash run: | + set -euo pipefail export ELECTRON_BUILDER_BINARIES_MIRROR="https://github.com/electron-userland/electron-builder-binaries/releases/download/" echo "Using ELECTRON_BUILDER_BINARIES_MIRROR=$ELECTRON_BUILDER_BINARIES_MIRROR" - npx electron-builder --mac dmg zip --arm64 --publish never '--config.publish.channel=dev' '--config.artifactName=${productName}-dev-arm64.${ext}' + if ! npx electron-builder --mac dmg zip --arm64 --publish never '--config.publish.channel=dev' '--config.artifactName=${productName}-dev-arm64.${ext}'; then + echo "::warning::DMG packaging failed (hdiutil instability on runner). Retrying with ZIP only." + npx electron-builder --mac zip --arm64 --publish never '--config.publish.channel=dev' '--config.artifactName=${productName}-dev-arm64.${ext}' + fi - name: Upload macOS arm64 assets to fixed release env: @@ -314,6 +318,9 @@ jobs: WINDOWS_ASSET="$(pick_asset "dev-x64-Setup[.]exe$")" WINDOWS_ARM64_ASSET="$(pick_asset "dev-arm64-Setup[.]exe$")" MAC_ASSET="$(pick_asset "dev-arm64[.]dmg$")" + if [ -z "$MAC_ASSET" ]; then + MAC_ASSET="$(pick_asset "dev-arm64[.]zip$")" + fi LINUX_TAR_ASSET="$(pick_asset "dev-linux[.]tar[.]gz$")" LINUX_APPIMAGE_ASSET="$(pick_asset "dev-linux[.]AppImage$")" diff --git a/.github/workflows/preview-nightly-main.yml b/.github/workflows/preview-nightly-main.yml index 94ad390..08b8556 100644 --- a/.github/workflows/preview-nightly-main.yml +++ b/.github/workflows/preview-nightly-main.yml @@ -134,9 +134,13 @@ jobs: CSC_IDENTITY_AUTO_DISCOVERY: "false" shell: bash run: | + set -euo pipefail export ELECTRON_BUILDER_BINARIES_MIRROR="https://github.com/electron-userland/electron-builder-binaries/releases/download/" echo "Using ELECTRON_BUILDER_BINARIES_MIRROR=$ELECTRON_BUILDER_BINARIES_MIRROR" - npx electron-builder --mac dmg zip --arm64 --publish never '--config.publish.channel=preview' '--config.artifactName=${productName}-preview-arm64.${ext}' + if ! npx electron-builder --mac dmg zip --arm64 --publish never '--config.publish.channel=preview' '--config.artifactName=${productName}-preview-arm64.${ext}'; then + echo "::warning::DMG packaging failed (hdiutil instability on runner). Retrying with ZIP only." + npx electron-builder --mac zip --arm64 --publish never '--config.publish.channel=preview' '--config.artifactName=${productName}-preview-arm64.${ext}' + fi - name: Upload macOS arm64 assets to fixed preview release env: @@ -359,6 +363,9 @@ jobs: fi WINDOWS_ARM64_ASSET="$(pick_asset "arm64.*[.]exe$")" MAC_ASSET="$(pick_asset "[.]dmg$")" + if [ -z "$MAC_ASSET" ]; then + MAC_ASSET="$(pick_asset "[.]zip$")" + fi LINUX_TAR_ASSET="$(pick_asset "[.]tar[.]gz$")" LINUX_APPIMAGE_ASSET="$(pick_asset "[.]AppImage$")" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0e88a8..33ae8f0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,9 +49,13 @@ jobs: CSC_IDENTITY_AUTO_DISCOVERY: "false" shell: bash run: | + set -euo pipefail export ELECTRON_BUILDER_BINARIES_MIRROR="https://github.com/electron-userland/electron-builder-binaries/releases/download/" echo "Using ELECTRON_BUILDER_BINARIES_MIRROR=$ELECTRON_BUILDER_BINARIES_MIRROR" - npx electron-builder --mac dmg zip --arm64 --publish always '--config.publish.owner=${{ github.repository_owner }}' '--config.publish.repo=${{ github.event.repository.name }}' + if ! npx electron-builder --mac dmg zip --arm64 --publish always '--config.publish.owner=${{ github.repository_owner }}' '--config.publish.repo=${{ github.event.repository.name }}'; then + echo "::warning::DMG packaging failed (hdiutil instability on runner). Retrying with ZIP only." + npx electron-builder --mac zip --arm64 --publish always '--config.publish.owner=${{ github.repository_owner }}' '--config.publish.repo=${{ github.event.repository.name }}' + fi - name: Inject minimumVersion into latest yml env: @@ -274,6 +278,9 @@ jobs: fi WINDOWS_ARM64_ASSET="$(echo "$ASSETS_JSON" | jq -r '[.assets[].name | select(test("arm64.*\\.exe$"))][0] // ""')" MAC_ASSET="$(pick_asset "\\.dmg$")" + if [ -z "$MAC_ASSET" ]; then + MAC_ASSET="$(pick_asset "arm64\\.zip$")" + fi LINUX_TAR_ASSET="$(pick_asset "\\.tar\\.gz$")" LINUX_APPIMAGE_ASSET="$(pick_asset "\\.AppImage$")"