From c20870cc7a29b7e0a3376c096f044f85110fa40b Mon Sep 17 00:00:00 2001 From: Luiz Sardinha Date: Tue, 25 Aug 2026 16:22:11 +0200 Subject: [PATCH] ci(mac): fixing bad conflict resolution (missing APPLE_CODESIGN_DEV for arm64) + providing log on notarization failure --- .github/workflows/continuous-integration.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 04a9dd6d8..e1f1a01ad 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -115,7 +115,7 @@ jobs: runs-on: macos-15 timeout: 20 qt-version: 6.11.2 - config-args: '-DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET=14' + config-args: '-DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET=14 ${APPLE_CODESIGN_DEV:+-DAPPLE_CODESIGN_DEV="$APPLE_CODESIGN_DEV"}' - name: "macos-x64" runs-on: macos-15-intel @@ -272,7 +272,7 @@ jobs: - name: Configure env: - APPLE_CODESIGN_DEV: ${{ secrets.APPLE_CODESIGN_DEV }} + APPLE_CODESIGN_DEV: ${{ ((github.ref == 'refs/heads/master') || (contains(github.ref, '/tags/v'))) && secrets.APPLE_CODESIGN_DEV || '' }} run: ${{env.CMAKE_CONFIGURE}} ${{ matrix.target.config-args }} ${{ steps.get-deps.outputs.vcpkg-cmake-config }} -DPACKAGE_VERSION_LABEL="${{env.DESKFLOW_PACKAGE_VERSION}}" - name: Import code-signing certificate @@ -330,7 +330,15 @@ jobs: [[ "$APPLE_CODESIGN_DEV" =~ ^Developer\ ID\ Application:\ .+\ \(([A-Z0-9]+)\)$ ]] APPLE_NOTARIZE_TEAM="${BASH_REMATCH[1]}" xcrun codesign -s "${APPLE_CODESIGN_DEV}" build/deskflow[-_]*.dmg - xcrun notarytool submit --apple-id "${APPLE_NOTARIZE_ID}" --password "${APPLE_NOTARIZE_PWD}" --team-id "${APPLE_NOTARIZE_TEAM}" --wait build/deskflow[-_]*.dmg + submission_log="${RUNNER_TEMP}/notarize.log" + xcrun notarytool submit --apple-id "${APPLE_NOTARIZE_ID}" --password "${APPLE_NOTARIZE_PWD}" --team-id "${APPLE_NOTARIZE_TEAM}" --wait build/deskflow[-_]*.dmg | tee "${submission_log}" + submission_id=$(grep 'id:' "${submission_log}" | tail -1 | awk '{print $2}') + submission_status=$(grep 'status:' "${submission_log}" | tail -1 | awk '{print $2}') + if [ "$submission_status" != "Accepted" ]; then + xcrun notarytool log --apple-id "${APPLE_NOTARIZE_ID}" --password "${APPLE_NOTARIZE_PWD}" --team-id "${APPLE_NOTARIZE_TEAM}" "$submission_id" + echo "Notarization failed with status: $submission_status" >&2 + exit 1 + fi xcrun stapler staple build/deskflow[-_]*.dmg - name: Clean up keychain