Skip to content

Commit 4762371

Browse files
committed
Update com.jagexlauncher.JagexLauncher
0 parents  commit 4762371

18 files changed

Lines changed: 1322 additions & 0 deletions

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: gitsubmodule
5+
schedule:
6+
interval: "daily"
7+
directory: /

.github/workflows/build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: build
2+
run-name: Build Flatpak
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
Build-Flatpak:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out repository code
12+
uses: actions/checkout@v4
13+
with:
14+
submodules: true
15+
- name: Setup GPG
16+
id: import-gpg
17+
uses: crazy-max/ghaction-import-gpg@v6
18+
with:
19+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
20+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
21+
git_config_global: true
22+
git_user_signingkey: true
23+
git_commit_gpgsign: true
24+
- name: Install dependencies
25+
run: |
26+
DEBIAN_FRONTEND=noninteractive sudo apt-get update -y
27+
git config --global protocol.file.allow always
28+
sudo apt-get install --no-install-recommends -y \
29+
icoutils \
30+
flatpak \
31+
flatpak-builder \
32+
elfutils \
33+
rsync \
34+
imagemagick
35+
- name: Build the flatpak
36+
env:
37+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
38+
GPG_KEY_GREP: ${{ secrets.GPG_KEY_GREP }}
39+
run: |
40+
ls ${{ github.workspace }}
41+
chmod +x build.sh
42+
./build.sh
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Check for updates
2+
on:
3+
schedule: # for scheduling to work this file must be in the default branch
4+
- cron: "0 * * * *" # run every hour
5+
workflow_dispatch: # can be manually dispatched under GitHub's "Actions" tab
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
flatpak-external-data-checker:
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
branch: [ main ] # list all branches to check
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
ref: ${{ matrix.branch }}
23+
- name: Set variables
24+
id: variables
25+
run: |
26+
echo "APP_NAME=$(basename $(git rev-parse --show-toplevel))" >> $GITHUB_OUTPUT
27+
- uses: docker://ghcr.io/flathub/flatpak-external-data-checker:latest
28+
env:
29+
GIT_AUTHOR_NAME: Flatpak External Data Checker
30+
GIT_COMMITTER_NAME: Flatpak External Data Checker
31+
# email sets "github-actions[bot]" as commit author, see https://github.community/t/github-actions-bot-email-address/17204/6
32+
GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
33+
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
34+
EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
35+
GITHUB_TOKEN: ${{ secrets.EXTERNAL_DATA_SECRET }}
36+
with:
37+
args: --update --never-fork ${{ steps.variables.outputs.APP_NAME }}.yml # e.g. com.organization.myapp.json

.github/workflows/release-repo.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Release
2+
permissions:
3+
contents: write
4+
pull-requests: write
5+
on:
6+
push:
7+
branches:
8+
- main
9+
workflow_dispatch: # can be manually dispatched under GitHub's "Actions" tab
10+
11+
concurrency:
12+
group: '${{ github.workflow }} @ ${{ github.ref }}'
13+
cancel-in-progress: false
14+
15+
jobs:
16+
release:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
submodules: true
23+
- name: Checkout Flatpak repository
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
ref: flatpak-repository
28+
path: repo
29+
- name: Setup GPG
30+
id: import-gpg
31+
uses: crazy-max/ghaction-import-gpg@v6
32+
with:
33+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
34+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
35+
git_config_global: true
36+
git_user_signingkey: true
37+
git_commit_gpgsign: true
38+
- name: Install dependencies
39+
run: |
40+
DEBIAN_FRONTEND=noninteractive sudo apt-get update -y
41+
git config --global protocol.file.allow always
42+
sudo apt-get install --no-install-recommends -y \
43+
icoutils \
44+
flatpak \
45+
flatpak-builder \
46+
elfutils \
47+
rsync \
48+
imagemagick
49+
- name: Build Flatpak
50+
env:
51+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
52+
GPG_KEY_GREP: ${{ secrets.GPG_KEY_GREP }}
53+
54+
run: |
55+
# gpg --import --batch ${GPG_PRIVATE_KEY}
56+
# echo "allow-preset-passphrase" >> ~/.gnupg/gpg-agent.conf
57+
# gpg-connect-agent reloadagent /bye
58+
# cat $GPG_PASSPHRASE | /usr/libexec/gpg-preset-passphrase --preset $GPG_KEY_GREP
59+
# gpg --import --batch ${GPG_PRIVATE_KEY}
60+
61+
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
62+
./build.sh
63+
- name: Push Flatpak repository
64+
run: |
65+
rsync -a ./out/ ./repo/
66+
cd repo
67+
touch test
68+
git add -A
69+
git commit --signoff -m "Update com.jagexlauncher.JagexLauncher"
70+
git reset $(git commit-tree HEAD^{tree} -m "Update com.jagexlauncher.JagexLauncher")
71+
git push --progress -f origin flatpak-repository
72+
env:
73+
GIT_AUTHOR_NAME: ${{ steps.import-gpg.outputs.name }}
74+
GIT_AUTHOR_EMAIL: ${{ steps.import-gpg.outputs.email }}
75+
GIT_COMMITTER_NAME: ${{ steps.import-gpg.outputs.name }}
76+
GIT_COMMITTER_EMAIL: ${{ steps.import-gpg.outputs.email }}
77+
GITHUB_TOKEN: ${{ secrets.PAT }}

.github/workflows/release.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
on:
2+
push:
3+
# Sequence of patterns matched against refs/tags
4+
branches: main
5+
workflow_dispatch: # can be manually dispatched under GitHub's "Actions" tab
6+
7+
name: Create Release
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
build:
14+
name: Create Release
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
submodules: true
21+
- name: Get tags
22+
run: git fetch --tags origin
23+
- name: Set variables
24+
id: variables
25+
run: |
26+
LAST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
27+
MAJOR=$(echo "$LAST_TAG" | cut -d. -f1)
28+
MINOR=$(echo "$LAST_TAG" | cut -d. -f2)
29+
PATCH=$(echo "$LAST_TAG" | cut -d. -f3)
30+
NEW_VERSION="$MAJOR.$MINOR.$((PATCH+1))"
31+
echo "NEW_TAG=$NEW_VERSION" >> $GITHUB_OUTPUT
32+
echo "APP_NAME=$(basename $(pwd))" >> $GITHUB_OUTPUT
33+
- name: Setup GPG
34+
id: import-gpg
35+
uses: crazy-max/ghaction-import-gpg@v6
36+
with:
37+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
38+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
39+
git_config_global: true
40+
git_user_signingkey: true
41+
git_commit_gpgsign: true
42+
- name: Install dependencies
43+
run: |
44+
DEBIAN_FRONTEND=noninteractive sudo apt-get update -y
45+
git config --global protocol.file.allow always
46+
sudo apt-get install --no-install-recommends -y \
47+
icoutils \
48+
flatpak \
49+
flatpak-builder \
50+
elfutils \
51+
rsync \
52+
appstream \
53+
appstream-compose
54+
- name: Build the flatpak bundle
55+
run: |
56+
chmod +x build.sh
57+
./build.sh
58+
flatpak build-bundle ~/.local/share/flatpak/repo ${{ steps.variables.outputs.APP_NAME }}.flatpak ${{ steps.variables.outputs.APP_NAME }}
59+
sha256sum ${{ steps.variables.outputs.APP_NAME }}.flatpak > ${{ steps.variables.outputs.APP_NAME }}.flatpak.sha256sum
60+
- name: Tag this branch with incremented release version
61+
id: new-tag
62+
run: |
63+
git tag ${{ steps.variables.outputs.NEW_TAG }}
64+
git push "https://$GITHUB_ACTOR:${{ secrets.ACCESS_TOKEN }}@github.com/$GITHUB_REPOSITORY.git" --tags
65+
- name: Release
66+
uses: softprops/action-gh-release@v1
67+
with:
68+
files: |
69+
${{ steps.variables.outputs.APP_NAME }}.flatpak
70+
${{ steps.variables.outputs.APP_NAME }}.flatpak.sha256sum
71+
tag_name: ${{ steps.variables.outputs.NEW_TAG }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.flatpak-builder

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "jagex-launcher-linux"]
2+
path = jagex-launcher-linux
3+
url = https://github.com/TormStorm/jagex-launcher-linux

0 commit comments

Comments
 (0)