From c675d7ea0b2e33737086d27b1ef0c93608c2d720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=A8=87?= Date: Sun, 25 Feb 2024 01:12:09 +0800 Subject: [PATCH] add appimage build --- .github/workflows/main.yml | 2 ++ github_appimage_build.sh | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 github_appimage_build.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a4f62eb..ee312b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,6 +23,8 @@ jobs: run: flutter config --enable-linux-desktop - name: Build artifacts run: flutter build linux --release + - name: Build Appimage + run: bash ./github_appimage_build.sh - name: Linux Release uses: actions/upload-artifact@v4 with: diff --git a/github_appimage_build.sh b/github_appimage_build.sh new file mode 100644 index 0000000..db63c08 --- /dev/null +++ b/github_appimage_build.sh @@ -0,0 +1,15 @@ +sudo apt install -y python3-pip python3-setuptools patchelf desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace fuse + +# Install appimagetool AppImage +sudo wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool +sudo chmod +x /usr/local/bin/appimagetool + +flutter build linux --release +cp -r ./build/linux/x64/release/bundle/ ./build/linux/x64/renamer.AppDir +cp -r ./appimage/renamer.desktop ./build/linux/x64/renamer.AppDir +cp -r ./assets/desktop.png ./build/linux/x64/renamer.AppDir +cp -r ./appimage/AppRun ./build/linux/x64/renamer.AppDir +chmod +x ./build/linux/x64/renamer.AppDir/AppRun +appimagetool ./build/linux/x64/renamer.AppDir +rm -rf ./build/linux/x64/renamer.AppDir +cp Renamer-x86_64.AppImage ./build/linux/x64/release/bundle/