Skip to content

Commit

Permalink
Enable nightly builds
Browse files Browse the repository at this point in the history
  • Loading branch information
FrogTheFrog committed Sep 23, 2024
1 parent 6f5aea7 commit adc2bdc
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 3 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI
on:
push:
branches:
- master
schedule:
- cron: "0 0 * * *"
jobs:
flatpak:
name: "Flatpak"
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-44
options: --privileged
steps:
- uses: actions/checkout@v4
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: com.moonlight_stream.Moonlight.flatpak
manifest-path: com.moonlight_stream.Moonlight.json
cache-key: flatpak-builder-${{ github.sha }}
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: dist
- name: Set current Moonlight commit
run: cd ".flatpak-builder/git/https_github.com_moonlight-stream_moonlight-qt.git" && echo "REV=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Set current date as env variable
run: echo "NOW=$(date -u +'%Y-%m-%d %H:%M:%S') UTC" >> $GITHUB_ENV
- name: Nightly Release
uses: andelf/nightly-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: |
Build date: ${{ env.NOW }}
Moonlight commit: [${{ env.REV }}](https://github.com/moonlight-stream/moonlight-qt/commit/${{ env.REV }})
prerelease: false
tag_name: nightly
name: 'Nightly Release'
files: dist/*/*.flatpak
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Builds nightly Moonlight releases for Flatpak

## One line install script (will uninstall the default version!)

```
curl -L https://raw.githubusercontent.com/FrogTheFrog/com.moonlight_stream.Moonlight/master/install.sh | sh
```
4 changes: 1 addition & 3 deletions com.moonlight_stream.Moonlight.json
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,7 @@
{
"type": "git",
"url": "https://github.com/moonlight-stream/moonlight-qt.git",
"disable-shallow-clone": true,
"tag": "v6.1.0",
"commit": "f786e94c7b2f943e24e65d7d74deb539b827fc84"
"disable-shallow-clone": true
}
]
}
Expand Down
18 changes: 18 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

tmp_file="/tmp/moonlight-nightly.flatpak";

[ -e file ] && rm $tmp_file;

echo "Downloading nighly version"
echo "-----"
curl -L -o $tmp_file https://github.com/FrogTheFrog/com.moonlight_stream.Moonlight/releases/download/nightly/com.moonlight_stream.Moonlight.flatpak;
echo "-----"

echo "Uninstalling old flatpak version";
sudo flatpak uninstall com.moonlight_stream.Moonlight -y &> /dev/null; # Flatpak output breaks terminal :/

echo "Installing nightly flatpak version";
sudo flatpak install "$tmp_file" -y &> /dev/null; # Flatpak output breaks terminal :/

[ -e file ] && rm $tmp_file;

0 comments on commit adc2bdc

Please sign in to comment.