Skip to content

Update release.yml

Update release.yml #58

Workflow file for this run

name: Release
permissions:
contents: write
pull-requests: write
on:
push:
branches:
- main
workflow_dispatch: # can be manually dispatched under GitHub's "Actions" tab
concurrency:
group: '${{ github.workflow }} @ ${{ github.ref }}'
cancel-in-progress: false
jobs:
release:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Checkout Flatpak repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: flatpak-repository
path: repo
- name: Setup GPG
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_config_global: true
git_user_signingkey: true
git_commit_gpgsign: true
- name: Install dependencies
run: |
DEBIAN_FRONTEND=noninteractive sudo apt-get update -y
git config --global protocol.file.allow always
sudo apt-get install --no-install-recommends -y \
icoutils \
flatpak \
flatpak-builder \
elfutils \
rsync
- name: Build Flatpak
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_KEY_GREP: ${{ secrets.GPG_KEY_GREP }}
run: |
# gpg --import --batch ${GPG_PRIVATE_KEY}
# echo "allow-preset-passphrase" >> ~/.gnupg/gpg-agent.conf
# gpg-connect-agent reloadagent /bye
# cat $GPG_PASSPHRASE | /usr/libexec/gpg-preset-passphrase --preset $GPG_KEY_GREP
# gpg --import --batch ${GPG_PRIVATE_KEY}
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
./build.sh
- name: Push Flatpak repository
run: |
rsync -a ./out/ ./repo/
cd repo
touch test
git add -A
git commit --signoff -m "Update com.jagexlauncher.JagexLauncher"
git reset $(git commit-tree HEAD^{tree} -m "Update com.jagexlauncher.JagexLauncher")
git push --progress -f origin flatpak-repository
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 }}
GITHUB_TOKEN: ${{ secrets.PAT }}