Add files via upload

Signed-off-by: Arakandai <113034028+NewMasterDai@users.noreply.github.com>
This commit is contained in:
Arakandai 2026-07-22 18:45:09 +02:00 committed by Jacob Schlecht
parent f79b113da1
commit 2513f03ed1
1 changed files with 99 additions and 0 deletions

99
.github/workflows/build-appimage.yml vendored Normal file
View File

@ -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 <<EOF
[Desktop Entry]
Type=Application
Name=Stoat
Exec=stoat-desktop
Icon=stoat
Categories=Utility;
EOF
# 7. Download and add icon
- name: Add Icon
run: |
wget -O Stoat.AppDir/stoat.png https://raw.githubusercontent.com/stoatchat/assets/bd432f2298901a8566a092636eef0c35a3a80fbc/desktop/icon.png
# 8. Build the AppImage
- name: Build AppImage
run: |
export ARCH=${{ matrix.arch }}
./appimagetool-x86_64.AppImage Stoat.AppDir
if [ "${{ matrix.arch }}" == "x64" ]; then
mv Stoat-x86_64.AppImage Stoat-linux-x86_64.AppImage
elif [ "${{ matrix.arch }}" == "arm64" ]; then
mv Stoat-aarch64.AppImage Stoat-linux-arm64.AppImage
fi
# 9. Upload the AppImage to the Release
- name: Upload to Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ matrix.arch == 'x64' && 'Stoat-linux-x86_64.AppImage' || 'Stoat-linux-arm64.AppImage' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#- name: Upload Artifact
#uses: actions/upload-artifact@v4
#with:
#name: Stoat-AppImage-${{ matrix.arch }}
# path: ${{ matrix.arch == 'x64' && 'Stoat-linux-x86_64.AppImage' || 'Stoat-linux-arm64.AppImage' }}
# if-no-files-found: error