Skip to content

Commit a4d47e2

Browse files
committed
provide dmg for macOS bundles
1 parent 254abe0 commit a4d47e2

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

.github/workflows/deployment.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,23 @@ jobs:
4343
run: cargo install cargo-bundle
4444
- name: Build
4545
run: cargo bundle --release
46-
- name: Compress
47-
run: cd target/release/bundle/osx && ls && zip -r rust-serial-monitor.app.zip Serial\ Monitor.app/*
46+
- name: Create DMG
47+
run: |
48+
cd target/release/bundle/osx
49+
ls
50+
hdiutil create -volname "Rust Serial Monitor" \
51+
-srcfolder "Serial Monitor.app" \
52+
-ov \
53+
-format UDZO \
54+
rust-serial-monitor.dmg
4855
- name: Upload
4956
uses: actions/upload-release-asset@v1.0.1
5057
env:
5158
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5259
with:
5360
upload_url: ${{ github.event.release.upload_url }}
54-
asset_path: ./target/release/bundle/osx/rust-serial-monitor.app.zip
55-
asset_name: rust-serial-monitor-macos_x86.app.zip
61+
asset_path: ./target/release/bundle/osx/rust-serial-monitor.dmg
62+
asset_name: rust-serial-monitor-macos_x86.dmg
5663
asset_content_type: binary
5764

5865
build-macos-arm:
@@ -65,16 +72,23 @@ jobs:
6572
run: cargo install cargo-bundle
6673
- name: Build
6774
run: cargo bundle --release
68-
- name: Compress
69-
run: cd target/release/bundle/osx && ls && zip -r rust-serial-monitor.app.zip Serial\ Monitor.app/*
75+
- name: Create DMG
76+
run: |
77+
cd target/release/bundle/osx
78+
ls
79+
hdiutil create -volname "Rust Serial Monitor" \
80+
-srcfolder "Serial Monitor.app" \
81+
-ov \
82+
-format UDZO \
83+
rust-serial-monitor.dmg
7084
- name: Upload
7185
uses: actions/upload-release-asset@v1.0.1
7286
env:
7387
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7488
with:
7589
upload_url: ${{ github.event.release.upload_url }}
76-
asset_path: ./target/release/bundle/osx/rust-serial-monitor.app.zip
77-
asset_name: rust-serial-monitor-macos_arm.app.zip
90+
asset_path: ./target/release/bundle/osx/rust-serial-monitor.dmg
91+
asset_name: rust-serial-monitor-macos_arm.dmg
7892
asset_content_type: binary
7993

8094
build-windows:

0 commit comments

Comments
 (0)