fix(actions): enhance macOS build workflow with additional app existence checks and error messaging
All checks were successful
Test macOS Build Action / test-macos-build (push) Successful in 56m18s

This commit is contained in:
Ozgur 2025-04-15 15:14:42 +02:00
parent ce5b037cc5
commit ea9c751434
No known key found for this signature in database
GPG Key ID: 66CDF27505A35546
3 changed files with 23 additions and 0 deletions

View File

@ -78,6 +78,18 @@ jobs:
# Set CI environment variable explicitly before running
export CI=true
./scripts/mac_build.sh
# Check if the build succeeded by looking for the app
APP_PATHS=$(find ./Builds -type d -name "*.app" 2>/dev/null || echo "")
if [ -z "$APP_PATHS" ]; then
APP_PATHS=$(find ./Saved/StagedBuilds -type d -name "*.app" 2>/dev/null || echo "")
fi
if [ -z "$APP_PATHS" ]; then
echo "❌ ERROR: Build command appeared to succeed but no app bundle was found!"
echo "This usually means the build failed but didn't properly return an error code."
exit 1
fi
else
echo "ERROR: Build script not found at ./scripts/mac_build.sh"
exit 1

View File

@ -9,6 +9,7 @@ public class LuckyWorldEditorTarget : TargetRules
{
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V5;
bOverrideBuildEnvironment = true;
ExtraModuleNames.AddRange( new string[] { "LuckyWorld" } );

View File

@ -76,6 +76,16 @@ echo "🦾 Build completed. Application path:"
APP_PATH=$(find "$ARCHIVE_DIR" -name "*.app" -type d | head -n 1)
echo "$APP_PATH"
# Check if the build actually succeeded by verifying the app exists
if [ -z "$APP_PATH" ] || [ ! -d "$APP_PATH" ]; then
echo "❌ ERROR: Build failed or did not produce an app bundle!"
echo "Check the logs above for build errors."
echo "Common issues:"
echo " - 'Targets with a unique build environment cannot be built with an installed engine'"
echo " Fix: Use bOverrideBuildEnvironment = true instead of BuildEnvironment = TargetBuildEnvironment.Unique"
exit 1
fi
if [ -n "$APP_PATH" ]; then
echo ""
echo "🔍 Binary files that will need signing:"