Skip to content

Commit e080d3c

Browse files
committed
chore: add DMG file icon to release builds
1 parent 5bc5e48 commit e080d3c

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/build-macos.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,25 @@ jobs:
4747
run: |
4848
appdmg appdmg.json dist/Taskito.dmg
4949
50+
- name: Set DMG Icon
51+
run: |
52+
ICON_PATH="$(pwd)/build/Build/Products/Release/Taskito.app/Contents/Resources/AppIcon.icns"
53+
DMG_PATH="$(pwd)/dist/Taskito.dmg"
54+
55+
# Use osascript to set the icon
56+
osascript - "$ICON_PATH" "$DMG_PATH" <<'APPLESCRIPT'
57+
on run argv
58+
set iconPath to item 1 of argv
59+
set dmgPath to item 2 of argv
60+
61+
tell application "Finder"
62+
set iconFile to (POSIX file iconPath) as alias
63+
set dmgFile to (POSIX file dmgPath) as alias
64+
set icon of dmgFile to (read iconFile)
65+
end tell
66+
end run
67+
APPLESCRIPT
68+
5069
- name: Validate DMG
5170
run: hdiutil verify dist/Taskito.dmg
5271

0 commit comments

Comments
 (0)