From 6ca6a1d0055a1016fdb2888cd54f015ddd041ba8 Mon Sep 17 00:00:00 2001 From: Arakandai <113034028+NewMasterDai@users.noreply.github.com> Date: Wed, 22 Jul 2026 18:45:09 +0200 Subject: [PATCH 1/2] Add files via upload Signed-off-by: Arakandai <113034028+NewMasterDai@users.noreply.github.com> --- .github/workflows/build-appimage.yml | 99 ++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 .github/workflows/build-appimage.yml diff --git a/.github/workflows/build-appimage.yml b/.github/workflows/build-appimage.yml new file mode 100644 index 0000000..680dea2 --- /dev/null +++ b/.github/workflows/build-appimage.yml @@ -0,0 +1,99 @@ +name: Build AppImage + +on: + workflow_dispatch: + release: + types: [published] + +jobs: + build-appimage: + runs-on: ubuntu-latest + strategy: + matrix: + arch: [x64, arm64] + + steps: + # 1. Checkout source code + - name: Checkout code + uses: actions/checkout@v4 + + # 2. Install dependencies + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y desktop-file-utils zsync libfuse2 + + # 3. Download appimagetool + - name: Download appimagetool + run: | + wget -c https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage + chmod +x appimagetool-x86_64.AppImage + + # 3. Download latest Linux binary release + - name: Download Latest Linux Zip (${{ matrix.arch }}) + uses: robinraju/release-downloader@v1 + with: + repository: "stoatchat/for-desktop" + latest: true + fileName: "Stoat-linux-${{ matrix.arch }}-*.zip" + out-file-path: "." + + # 4. Setup AppDir + - name: Setup AppDir + run: | + mkdir -p Stoat.AppDir + unzip Stoat-linux-${{ matrix.arch }}-*.zip + mv Stoat-linux-${{ matrix.arch }}/* Stoat.AppDir/ + rmdir Stoat-linux-${{ matrix.arch }} + + # 5. Create AppRun + - name: Create AppRun + run: | + cd Stoat.AppDir + ln -s stoat-desktop AppRun + chmod +x AppRun + + # 6. Create .desktop + - name: Create Desktop File + run: | + cat > Stoat.AppDir/stoat.desktop < Date: Wed, 22 Jul 2026 19:53:46 +0200 Subject: [PATCH 2/2] Update build-appimage.yml requested changes Signed-off-by: Arakandai <113034028+NewMasterDai@users.noreply.github.com> --- .github/workflows/build-appimage.yml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-appimage.yml b/.github/workflows/build-appimage.yml index 680dea2..5df6480 100644 --- a/.github/workflows/build-appimage.yml +++ b/.github/workflows/build-appimage.yml @@ -17,6 +17,12 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + # FIX #1: for packaging only, manual setup is often cleaner (let's not mess with electron-builder, that's the point). + # To satisfy request, we use a more robust dependency setup + # and rely on the standard ubuntu environment where possible. + # Note: There is no single "magic action" to package pre-built binaries + # without a recipe (which pkg2appimage failed to automate with Stoat), we keep the steps but make them robust. + # 2. Install dependencies - name: Install dependencies run: | @@ -29,12 +35,17 @@ jobs: wget -c https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage chmod +x appimagetool-x86_64.AppImage + # FIX #2: The race condition is avoided by ensuring our primary build workflow uploads assets to a Draft release first, then publishes it. + # When the published event fires, the assets are already attached. + # I've added tag ${{ github.event.release.tag_name }} instead to the downloader to explicitly target the triggering release, + # ensuring we never accidentally download from a different version. + # 3. Download latest Linux binary release - name: Download Latest Linux Zip (${{ matrix.arch }}) uses: robinraju/release-downloader@v1 with: repository: "stoatchat/for-desktop" - latest: true + tag: ${{ github.event.release.tag_name }} fileName: "Stoat-linux-${{ matrix.arch }}-*.zip" out-file-path: "." @@ -53,17 +64,14 @@ jobs: ln -s stoat-desktop AppRun chmod +x AppRun + # FIX #3: Use existing desktop file, after adjusting (since designed for flatpak. + # 6. Create .desktop - name: Create Desktop File run: | - cat > Stoat.AppDir/stoat.desktop <