Skip to content

Commit

Permalink
Merge branch 'jpochyla:master' into Visualize-keyboard-shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
SO9010 authored Sep 3, 2024
2 parents bcbf466 + 0cd9904 commit 3a2556f
Show file tree
Hide file tree
Showing 15 changed files with 1,052 additions and 441 deletions.
37 changes: 22 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,40 +68,46 @@ jobs:
if: runner.os == 'Windows'
run: cargo build --release

- name: Cache cargo-bundle
if: runner.os == 'macOS'
id: cache-cargo-bundle
- name: Cache cargo-bundle and Homebrew
id: cache-tools
uses: actions/cache@v4
with:
path: ~/.cargo/bin/cargo-bundle
key: ${{ runner.os }}-cargo-bundle-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/bin/cargo-bundle
~/Library/Caches/Homebrew
/usr/local/Cellar/create-dmg
key: ${{ runner.os }}-tools-${{ hashFiles('**/Cargo.lock', '.github/workflows/build.yml') }}
restore-keys: |
${{ runner.os }}-tools-
- name: Install cargo-bundle
if: runner.os == 'macOS' && steps.cache-cargo-bundle.outputs.cache-hit != 'true'
if: runner.os == 'macOS' && !steps.cache-tools.outputs.cache-hit
run: cargo install cargo-bundle

- name: Bundle macOS Release
if: runner.os == 'macOS'
run: cargo bundle --release
working-directory: psst-gui
- name: Install create-dmg
if: runner.os == 'macOS' && !steps.cache-tools.outputs.cache-hit
run: brew install create-dmg

- name: Create macOS universal binary
if: runner.os == 'macOS'
run: |
lipo -create -output target/release/bundle/osx/Psst.app/Contents/MacOS/psst-gui \
mkdir -p psst-gui/target/release
lipo -create -output psst-gui/target/release/psst-gui \
target/x86_64-apple-darwin/release/psst-gui \
target/aarch64-apple-darwin/release/psst-gui
- name: Install create-dmg
- name: Bundle macOS Release
if: runner.os == 'macOS'
run: brew install create-dmg
run: cargo bundle --release
working-directory: psst-gui

- name: Create DMG
if: runner.os == 'macOS'
run: |
brew install create-dmg
create-dmg \
--volname "Psst" \
--volicon "psst-gui/assets/logo.icns" \
--volicon "assets/logo.icns" \
--window-pos 200 120 \
--window-size 600 400 \
--icon-size 100 \
Expand All @@ -111,13 +117,14 @@ jobs:
--no-internet-enable \
"Psst.dmg" \
"target/release/bundle/osx/Psst.app"
working-directory: psst-gui

- name: Upload macOS DMG
uses: actions/upload-artifact@v4
if: runner.os == 'macOS'
with:
name: Psst.dmg
path: Psst.dmg
path: ./psst-gui/Psst.dmg

- name: Make Linux Binary Executable
if: runner.os == 'Linux'
Expand Down
Loading

0 comments on commit 3a2556f

Please sign in to comment.