-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (39 loc) · 1.33 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
# macos-latest is aarch64, install x86_64 target
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-apple-darwin
# build our two architectures
- name: Build (AArch64)
run: cargo build --target=aarch64-apple-darwin --release
- name: Build (x86_64)
run: cargo build --target=x86_64-apple-darwin --release
# packaging
- name: Create .app bundle
run: ./package-macos-app.sh bundle
- name: Create DMG
run: hdiutil create -volname "moonlight installer" -srcfolder temp/app -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