From 137f1cda49152aceb410ef34d487126d41e496ed Mon Sep 17 00:00:00 2001 From: Roman Marinsky Date: Fri, 15 May 2026 11:10:54 +0300 Subject: [PATCH] refactor(release): stage app into dedicated dir for create-dmg Cleaner than deleting export artifacts after the fact: copy only the .app into a staging dir and point create-dmg at that. The DMG can no longer accidentally pick up DistributionSummary.plist, ExportOptions.plist or Packaging.log no matter what xcodebuild leaves behind in build/export/. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/release.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ac11064..13f13ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -157,11 +157,6 @@ jobs: -exportPath "$EXPORT_DIR" \ -exportOptionsPlist build/ExportOptions.plist - # Remove export artifacts that would end up in the DMG - rm -f "$EXPORT_DIR/DistributionSummary.plist" \ - "$EXPORT_DIR/ExportOptions.plist" \ - "$EXPORT_DIR/Packaging.log" - echo "Architectures:" lipo -archs "$EXPORT_DIR/$APP_BUNDLE_NAME/Contents/MacOS/$APP_NAME" @@ -184,6 +179,14 @@ jobs: brew install create-dmg VERSION=${GITHUB_REF_NAME#v} + # Stage ONLY the .app — never point create-dmg at $EXPORT_DIR + # itself, because xcodebuild also drops DistributionSummary.plist, + # ExportOptions.plist and Packaging.log there. + STAGE_DIR="build/dmg-stage" + rm -rf "$STAGE_DIR" + mkdir -p "$STAGE_DIR" + cp -R "$EXPORT_DIR/$APP_BUNDLE_NAME" "$STAGE_DIR/" + create-dmg \ --volname "$APP_NAME" \ --window-pos 200 120 \ @@ -192,7 +195,7 @@ jobs: --icon "$APP_BUNDLE_NAME" 175 190 \ --app-drop-link 425 190 \ "build/${DISPLAY_NAME}-${VERSION}.dmg" \ - "$EXPORT_DIR/" + "$STAGE_DIR/" shasum -a 256 "build/${DISPLAY_NAME}-${VERSION}.dmg" | awk '{print $1}' > "build/${DISPLAY_NAME}-${VERSION}.sha256"