Add update CI #34
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: Release | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
paths: | |
- 'com.jagex.Launcher.yaml' | |
- 'resources/**' | |
- 'build.sh' | |
- '.github/workflows/release.yaml' | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.ref }}' | |
cancel-in-progress: false | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Checkout Flatpak repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: flatpak-repository | |
path: repo | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.12 | |
- name: Setup GPG | |
id: import-gpg | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
git_config_global: true | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: Install dependencies | |
run: | | |
DEBIAN_FRONTEND=noninteractive sudo apt-get update -y | |
sudo apt-get install --no-install-recommends -y \ | |
icoutils \ | |
flatpak \ | |
flatpak-builder \ | |
elfutils | |
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo | |
- name: Cache Flatpak builder | |
id: cache-flatpak-builder | |
uses: actions/cache@v3 | |
with: | |
path: .flatpak-builder | |
key: ${{ runner.os }}-flatpak-builder-${{ hashFiles('com.jagex.Launcher.yaml') }} | |
- name: Build Flatpak | |
run: | | |
./build.sh sign | |
- name: Push Flatpak repository | |
run: | | |
cd repo | |
git add -A | |
git commit --signoff -m "Update com.jagex.Launcher" | |
git push | |
env: | |
GIT_AUTHOR_NAME: ${{ steps.import-gpg.outputs.name }} | |
GIT_AUTHOR_EMAIL: ${{ steps.import-gpg.outputs.email }} | |
GIT_COMMITTER_NAME: ${{ steps.import-gpg.outputs.name }} | |
GIT_COMMITTER_EMAIL: ${{ steps.import-gpg.outputs.email }} |