-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
105 additions
and
30 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
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-linux: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Build AppImage | ||
run: ./build-linux.sh | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: moonlight-installer-linux | ||
path: ./moonlight-installer-x86_64.AppImage | ||
|
||
# TODO: macOS | ||
# build-macos: |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
/target | ||
|
||
# Linux packaging | ||
/AppDir | ||
/appimage-build | ||
*.AppImage |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
version: 1 | ||
AppDir: | ||
path: ./AppDir | ||
|
||
app_info: | ||
id: io.github.moonlight-mod.installer | ||
name: moonlight installer | ||
icon: moonlight-installer | ||
version: 0.2.0 | ||
exec: usr/bin/moonlight-installer | ||
exec_args: $@ | ||
|
||
files: | ||
include: | ||
- usr/bin/moonlight-installer | ||
|
||
test: | ||
fedora-30: | ||
image: appimagecrafters/tests-env:fedora-30 | ||
command: ./AppRun | ||
debian-stable: | ||
image: appimagecrafters/tests-env:debian-stable | ||
command: ./AppRun | ||
archlinux-latest: | ||
image: appimagecrafters/tests-env:archlinux-latest | ||
command: ./AppRun | ||
centos-7: | ||
image: appimagecrafters/tests-env:centos-7 | ||
command: ./AppRun | ||
ubuntu-xenial: | ||
image: appimagecrafters/tests-env:ubuntu-xenial | ||
command: ./AppRun | ||
|
||
AppImage: | ||
arch: x86_64 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env sh | ||
set -e | ||
|
||
echo "Building installer..." | ||
cargo build --release | ||
|
||
if [ -d ./AppDir ]; then | ||
echo "Cleaning up old AppDir..." | ||
rm -rf ./AppDir | ||
fi | ||
|
||
echo "Creating AppDir..." | ||
mkdir -p ./AppDir/usr/bin | ||
mkdir -p ./AppDir/usr/share/icons/hicolor/256x256 | ||
cp ./target/release/moonlight-installer ./AppDir/usr/bin | ||
cp ./assets/icon.png ./AppDir/usr/share/icons/hicolor/256x256/moonlight-installer.png | ||
|
||
if [ ! -f ./appimage-builder-x86_64.AppImage ]; then | ||
echo "Downloading appimage-builder..." | ||
# Nothing has ever gone wrong in the history of downloading random binaries off of the Internet | ||
wget -O ./appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage | ||
chmod +x ./appimage-builder-x86_64.AppImage | ||
fi | ||
|
||
echo "Building AppImage..." | ||
./appimage-builder-x86_64.AppImage --recipe ./AppImageBuilder.yml | ||
|
||
# Move the appimage into a predictable location for CI | ||
mv "./moonlight installer-*-x86_64.AppImage" ./moonlight-installer-x86_64.AppImage |