Skip to content

Commit 3741f79

Browse files
committed
chore: add custom dmg background
Update build.yml
1 parent 5ef0b41 commit 3741f79

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ jobs:
157157
p12-file-base64: ${{ secrets.DEV_ID_P12_BASE64 }}
158158
p12-password: ${{ secrets.DEV_ID_P12_PASSWORD }}
159159

160+
- name: Download CreateDMG
161+
run: |
162+
brew install create-dmg
163+
160164
- name: Create Universal Binary
161165
run: |
162166
mkdir -p build/universal
@@ -178,8 +182,16 @@ jobs:
178182
- name: Create DMG
179183
run: |
180184
mkdir -p build/out
181-
ln -s /Applications build/dmg/Applications
182-
hdiutil create -volname ${{ env.BUNDLE_NAME }} -srcfolder build/dmg -ov -format UDZO build/out/${{ env.BUNDLE_NAME }}.dmg
185+
create-dmg \
186+
--volname ${{ env.BUNDLE_NAME }} \
187+
--background "package/macos/background.png" \
188+
--window-pos 200 120 \
189+
--window-size 510 350 \
190+
--icon-size 100 \
191+
--icon ${{ env.BUNDLE_NAME }}.app 160 155 \
192+
--hide-extension "${{ env.BUNDLE_NAME }}.app" \
193+
--app-drop-link 350 155 \
194+
build/out/${{ env.BUNDLE_NAME }}.dmg build/dmg
183195
184196
- name: Notarize DMG
185197
run: |

package/macos/background.png

57.4 KB
Loading

0 commit comments

Comments
 (0)