1 parent 5bc5e48 commit e080d3cCopy full SHA for e080d3c
1 file changed
.github/workflows/build-macos.yml
@@ -47,6 +47,25 @@ jobs:
47
run: |
48
appdmg appdmg.json dist/Taskito.dmg
49
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
69
- name: Validate DMG
70
run: hdiutil verify dist/Taskito.dmg
71
0 commit comments