Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 75 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ jobs:
- name: Extract build artifacts
run: |
ARTIFACT_DIR=$(find temp_artifacts -maxdepth 1 -type d -name "gswatcher_${{ env.APP_VERSION }}+${{ matrix.image }}.*" | head -n 1)
mkdir ${{ env.OUTDIR }}
mkdir -p ${{ env.OUTDIR }}
cp -r "$ARTIFACT_DIR"/* ${{ env.OUTDIR }}/
rm -rf temp_artifacts

Expand Down Expand Up @@ -220,11 +220,79 @@ jobs:
}}
path: ${{ env.OUTDIR }}

build-appimage:
strategy:
matrix:
include:
- { image: ubuntu-24.04, arch: x86_64 }
- { image: ubuntu-24.04-arm, arch: aarch64 }

runs-on: ${{ matrix.image }}

needs: build-linux

env:
OUTDIR: AppDir

steps:
- name: Checkout
uses: actions/checkout@v5

- name: Extract version
run: |
VERSION=$(grep -oP "version: '\K[0-9]+\.[0-9]+\.[0-9]+" meson.build)
echo "APP_VERSION=$VERSION" >> $GITHUB_ENV

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
pattern: gswatcher_${{ env.APP_VERSION }}+${{ matrix.image }}.*
path: temp_artifacts

- name: Extract build artifacts
run: |
ARTIFACT_DIR=$(find temp_artifacts -maxdepth 1 -type d -name "gswatcher_${{ env.APP_VERSION }}+${{ matrix.image }}.*" | head -n 1)
mkdir -p ${{ env.OUTDIR }}/usr
cp -r "$ARTIFACT_DIR"/* ${{ env.OUTDIR }}/usr/
rm -rf temp_artifacts

- name: Setup dependencies
run: |
sudo apt-get update
sudo apt-get install -y libfuse2t64 libgee-0.8-dev libgtk-4-dev libadwaita-1-dev liblua5.4-dev libgeoip-dev

- name: Get linuxdeploy
run: |
wget -c "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${{ matrix.arch }}.AppImage" -O linuxdeploy.AppImage
chmod +x linuxdeploy.AppImage
wget -c "https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh"
chmod +x linuxdeploy-plugin-gtk.sh

- name: Build AppImage
run: |
export OUTPUT="gswatcher-${{ env.APP_VERSION }}-${{ matrix.arch }}.AppImage"
export DEPLOY_GTK_VERSION=4
./linuxdeploy.AppImage --appdir ${{ env.OUTDIR }} --plugin gtk --output appimage --icon-file "${{ env.OUTDIR }}/usr/share/icons/hicolor/512x512/apps/io.github.lxndr.gswatcher.png" --desktop-file "${{ env.OUTDIR }}/usr/share/applications/io.github.lxndr.gswatcher.desktop"
chmod +x "${{ env.OUTDIR }}/AppRun"
chmod +x "${{ env.OUTDIR }}/AppRun.wrapped"

- name: Upload AppImage artifacts
uses: actions/upload-artifact@v4
with:
name: >-
${{
(github.event_name == 'pull_request' &&
format('gswatcher_{0}+{1}.pr{2}.appimage.{3}.build{4}', env.APP_VERSION, matrix.image, github.event.number, matrix.arch, github.run_number)) ||
format('gswatcher_{0}+{1}.appimage.{2}.build{3}', env.APP_VERSION, matrix.image, matrix.arch, github.run_number)
}}
path: gswatcher-${{ env.APP_VERSION }}-${{ matrix.arch }}.AppImage

release:
runs-on: ubuntu-24.04

needs:
- create-windows-portable
- build-appimage

if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}

Expand All @@ -235,6 +303,12 @@ jobs:
pattern: gswatcher_*+windows-portable.*
path: ./artifacts

- name: Download AppImage artifacts
uses: actions/download-artifact@v4
with:
pattern: gswatcher_*+*.appimage.*
path: ./artifacts

- name: Release
uses: softprops/action-gh-release@v1
with:
Expand Down
4 changes: 4 additions & 0 deletions gswatcher.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"cSpell.words": [
"absindex",
"ADWAITA",
"APPDIR",
"appimage",
"appimagetool",
"APPNAME",
Expand All @@ -32,6 +33,7 @@
"checkstring",
"checktype",
"checkudata",
"clangarm",
"cmpint",
"cmpmem",
"cmpstr",
Expand Down Expand Up @@ -105,10 +107,12 @@
"launchable",
"lauxlib",
"libadwaita",
"libfuse",
"libgee",
"libgeoip",
"liblua",
"LIGHTUSERDATA",
"linuxdeploy",
"listitem",
"loadstring",
"lstring",
Expand Down