Skip to content

[macOS] Build a DMG in GitHub Actions instead of using a ZIP #15

[macOS] Build a DMG in GitHub Actions instead of using a ZIP

[macOS] Build a DMG in GitHub Actions instead of using a ZIP #15

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: moonlight-installer-windows
path: target/release/moonlight-installer.exe
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install cargo-bundle
run: cargo install cargo-bundle
- name: Build
run: cargo build --release
- name: Bundle
run: cargo bundle --release
- name: Apply ad-hoc signature
run: codesign --force --deep -s - "target/release/bundle/osx/moonlight installer.app"
- name: Create DMG
run: hdiutil create -volname "Moonlight Installer" -srcfolder target/release/bundle/osx -ov -format UDZO moonlight-installer-macos.dmg
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: moonlight-installer-macos
path: moonlight-installer-macos.dmg