fix(actions): enhance DMG creation process in macOS notarization workflow by adding dynamic volume icon handling and improving command execution logging
Some checks failed
Test macOS Build Action / test-macos-build (push) Failing after 48m56s

This commit is contained in:
Ozgur 2025-04-17 00:53:08 +02:00
parent 8344738968
commit 477d91fa3f
No known key found for this signature in database
GPG Key ID: 66CDF27505A35546

View File

@ -222,22 +222,36 @@ if [ -f "$OUTPUT_DMG" ]; then
rm -f "$OUTPUT_DMG" rm -f "$OUTPUT_DMG"
fi fi
# Create DMG using create-dmg # Check if icon file exists
create-dmg \ ICON_PATH="$(dirname "$0")/assets/LuckyWorld.icns"
--volname "LuckyWorld ${VERSION}" \ VOLICON_PARAM=""
--volicon "$(dirname "$0")/assets/LuckyWorld.icns" \ if [ -f "$ICON_PATH" ]; then
echo -e "${GREEN}Using volume icon: $ICON_PATH${NC}"
VOLICON_PARAM="--volicon \"$ICON_PATH\""
else
echo -e "${YELLOW}Volume icon not found at $ICON_PATH. Creating DMG without custom icon.${NC}"
fi
# Create DMG using create-dmg with dynamic volicon parameter
CMD_CREATE_DMG="create-dmg \
--volname \"LuckyWorld ${VERSION}\" \
$VOLICON_PARAM \
--window-pos 200 120 \ --window-pos 200 120 \
--window-size 800 500 \ --window-size 800 500 \
--icon-size 128 \ --icon-size 128 \
--icon "LuckyWorld.app" 200 250 \ --icon \"LuckyWorld.app\" 200 250 \
--icon "install_luckyworld.sh" 400 250 \ --icon \"install_luckyworld.sh\" 400 250 \
--icon "README.txt" 600 250 \ --icon \"README.txt\" 600 250 \
--hide-extension "LuckyWorld.app" \ --hide-extension \"LuckyWorld.app\" \
--hide-extension "install_luckyworld.sh" \ --hide-extension \"install_luckyworld.sh\" \
--app-drop-link 400 120 \ --app-drop-link 400 120 \
--no-internet-enable \ --no-internet-enable \
"$OUTPUT_DMG" \ \"$OUTPUT_DMG\" \
"$TEMP_DIR" \"$TEMP_DIR\""
# Execute the command
echo -e "${BLUE}Executing: $CMD_CREATE_DMG${NC}"
eval $CMD_CREATE_DMG
# Check if DMG creation was successful # Check if DMG creation was successful
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then