One last try before I form a vendetta against Apple #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 --bin moonlight-installer --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 | |
- name: Install cargo-bundle | |
run: cargo install cargo-bundle | |
# cargo-bundle doesn't understand what to do about workspaces | |
- name: Bundle | |
run: | | |
cargo build --release | |
cp -r ./target ./crates/moonlight-installer/target | |
cd ./crates/moonlight-installer | |
cargo bundle --release | |
cd ../.. | |
rm -rf ./target | |
mv ./crates/moonlight-installer/target . | |
- 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 |