Skip to content

Commit ae4f16d

Browse files
authored
Get build for Intel macOS working (#718)
1 parent 4325f5d commit ae4f16d

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ jobs:
9191
path: |
9292
~/.cargo/bin/cargo-bundle
9393
~/Library/Caches/Homebrew
94-
/usr/local/Cellar/create-dmg
9594
key: ${{ runner.os }}-tools-${{ hashFiles('**/Cargo.lock', '.github/workflows/build.yml') }}
9695
restore-keys: |
9796
${{ runner.os }}-tools-
@@ -101,45 +100,46 @@ jobs:
101100
run: cargo install cargo-bundle
102101

103102
- name: Install create-dmg
104-
if: runner.os == 'macOS' && !steps.cache-tools.outputs.cache-hit
105-
run: brew install create-dmg
103+
if: runner.os == 'macOS'
104+
run: brew install -q create-dmg
106105

107106
- name: Create macOS universal binary
108107
if: runner.os == 'macOS'
109108
run: |
110-
mkdir -p psst-gui/target/release
111-
lipo -create -output psst-gui/target/release/psst-gui \
112-
target/x86_64-apple-darwin/release/psst-gui \
113-
target/aarch64-apple-darwin/release/psst-gui
109+
mkdir -p target/release
110+
lipo -create \
111+
-arch x86_64 target/x86_64-apple-darwin/release/psst-gui \
112+
-arch arm64 target/aarch64-apple-darwin/release/psst-gui \
113+
-output target/release/psst-gui
114114
115115
- name: Bundle macOS Release
116116
if: runner.os == 'macOS'
117-
run: cargo bundle --release
118-
working-directory: psst-gui
117+
env:
118+
CARGO_BUNDLE_SKIP_BUILD: "true"
119+
run: |
120+
cargo bundle --release -p psst-gui
119121
120122
- name: Create DMG
121123
if: runner.os == 'macOS'
122124
run: |
123-
brew install create-dmg
124125
create-dmg \
125126
--volname "Psst" \
126-
--volicon "assets/logo.icns" \
127+
--volicon "psst-gui/assets/logo.icns" \
127128
--window-pos 200 120 \
128129
--window-size 600 400 \
129130
--icon-size 100 \
130131
--icon "Psst.app" 150 160 \
131132
--hide-extension "Psst.app" \
132133
--app-drop-link 450 160 \
133134
"Psst.dmg" \
134-
"../target/release/bundle/osx/Psst.app"
135-
working-directory: psst-gui
135+
"target/release/bundle/osx/Psst.app"
136136
137137
- name: Upload macOS DMG
138138
uses: actions/upload-artifact@v4
139139
if: runner.os == 'macOS'
140140
with:
141141
name: Psst.dmg
142-
path: ./psst-gui/Psst.dmg
142+
path: Psst.dmg
143143

144144
- name: Make Linux Binary Executable
145145
if: runner.os == 'Linux'

psst-gui/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ name = "Psst"
6363
identifier = "com.jpochyla.psst"
6464
icon = ["assets/logo.icns"]
6565
version = "0.1.0"
66+
osx_minimum_system_version = "11.0"
6667
resources = []
6768
copyright = "Copyright (c) Jan Pochyla 2024. All rights reserved."
6869
category = "Music"

0 commit comments

Comments
 (0)