From 326305a3370adbf973c480e6efde73bff9f3dd17 Mon Sep 17 00:00:00 2001 From: scawful Date: Sat, 27 Sep 2025 00:25:45 -0400 Subject: [PATCH] Enhance macOS app bundle creation in release workflow - Updated the release workflow to check for an existing macOS app bundle before creating a new one, improving efficiency. - Added debug output to list built files and clarify the build process. - Streamlined the resource copying process for both existing and newly created bundles, ensuring all necessary assets are included. --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e960ebb6..64651747 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -142,12 +142,30 @@ jobs: artifact_name: "yaze-macos" artifact_path: "build/bin/" package_cmd: | - # Create macOS app bundle and DMG - mkdir -p "Yaze.app/Contents/MacOS" - mkdir -p "Yaze.app/Contents/Resources" - cp build/bin/yaze "Yaze.app/Contents/MacOS/" - cp -r assets "Yaze.app/Contents/Resources/" - cp cmake/yaze.plist.in "Yaze.app/Contents/Info.plist" + # Debug: List what was actually built + echo "Contents of build/bin/:" + ls -la build/bin/ || echo "build/bin/ does not exist" + + # Check if we have a bundle or standalone executable + if [ -d "build/bin/yaze.app" ]; then + echo "Found macOS bundle, using it directly" + # Use the existing bundle and just update it + cp -r build/bin/yaze.app ./Yaze.app + # Add additional resources to the bundle + cp -r assets "Yaze.app/Contents/Resources/" + # Update Info.plist if needed + if [ -f "cmake/yaze.plist.in" ]; then + cp cmake/yaze.plist.in "Yaze.app/Contents/Info.plist" + fi + else + echo "No bundle found, creating manual bundle" + # Create bundle structure manually + mkdir -p "Yaze.app/Contents/MacOS" + mkdir -p "Yaze.app/Contents/Resources" + cp build/bin/yaze "Yaze.app/Contents/MacOS/" + cp -r assets "Yaze.app/Contents/Resources/" + cp cmake/yaze.plist.in "Yaze.app/Contents/Info.plist" + fi # Create DMG mkdir dmg_staging