feature: AppImage release build (#245)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2025-02-28 13:04:12 +01:00 committed by GitHub
parent 7fbad0b0ce
commit cfcedbcc42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 98 additions and 13 deletions

View file

@ -126,8 +126,8 @@ jobs:
channel: "stable"
flutter-version: ${{needs.fetch-info.outputs.flutter-version}}
cache: true
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
- name: Get dependencies
run: flutter pub get
@ -169,8 +169,8 @@ jobs:
channel: "stable"
flutter-version: ${{needs.fetch-info.outputs.flutter-version}}
cache: true
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to specify the cache path
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
- name: Get dependencies
run: flutter pub get
@ -205,8 +205,8 @@ jobs:
channel: "stable"
flutter-version: ${{needs.fetch-info.outputs.flutter-version}}
cache: true
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
- name: Get dependencies
run: flutter pub get
@ -224,7 +224,7 @@ jobs:
path: build/macos/Build/Products/Release-production/macOS.dmg
build-linux:
runs-on: ubuntu-24.04 # bumped from 22.04 (latest) as it would otherwise use libmpv1
runs-on: ubuntu-latest
needs: [fetch-info]
steps:
@ -237,8 +237,12 @@ jobs:
channel: "stable"
flutter-version: ${{needs.fetch-info.outputs.flutter-version}}
cache: true
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
- name: Update build number in pubspec.yaml
run: |
sed -i -E 's/(version: [0-9]+\.[0-9]+\.[0-9]+\+)[0-9]+/\1${{ github.run_number }}/' pubspec.yaml
- name: Get dependencies
run: flutter pub get
@ -246,7 +250,7 @@ jobs:
- name: Get packages
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev libmpv-dev patchelf cmake clang
sudo apt-get install -y ninja-build libgtk-3-dev libmpv-dev patchelf cmake clang libfuse2
- name: Build Linux app
run: flutter build linux --release --build-number=${{ github.run_number }}
@ -265,6 +269,21 @@ jobs:
name: fladder-linux
path: build/linux/x64/release/bundle
- name: Build AppImage
run: |
wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
chmod +x appimage-builder-x86_64.AppImage
sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder
appimage-builder --recipe AppImageBuilder.yml
- name: Archive Linux artifact
uses: actions/upload-artifact@v4
with:
name: fladder-linux-appimage
path: |
Fladder_x86_64.AppImage
Fladder_x86_64.AppImage.zsync
build-linux-flatpak:
name: "Flatpak"
runs-on: ubuntu-latest
@ -310,8 +329,8 @@ jobs:
channel: "stable"
flutter-version: ${{needs.fetch-info.outputs.flutter-version}}
cache: true
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
- name: Get dependencies
run: flutter pub get
@ -419,6 +438,20 @@ jobs:
- name: Move Linux Flatpak
run: mv fladder-linux-flatpak/Fladder-Linux.flatpak Fladder-Linux-${{needs.fetch-info.outputs.version_name}}.flatpak
- name: Download Artifacts Linux AppImage
uses: actions/download-artifact@v4
with:
name: fladder-linux-appimage
path: fladder-linux-appimage
- name: Archive Linux artifact
uses: actions/upload-artifact@v4
with:
name: fladder-linux-appimage
path: |
mv fladder-linux-appimage/Fladder_x86_64.AppImage Fladder-Linux-${{needs.fetch-info.outputs.version_name}}.AppImage
mv fladder-linux-appimage/Fladder_x86_64.AppImage.zsync Fladder-Linux-${{needs.fetch-info.outputs.version_name}}.AppImage.zsync
- name: Download Artifacts Web
uses: actions/download-artifact@v4
with:
@ -445,6 +478,8 @@ jobs:
Fladder-Web-${{needs.fetch-info.outputs.version_name}}.zip
Fladder-Linux-${{needs.fetch-info.outputs.version_name}}.zip
Fladder-Linux-${{needs.fetch-info.outputs.version_name}}.flatpak
Fladder-Linux-${{needs.fetch-info.outputs.version_name}}.AppImage
Fladder-Linux-${{needs.fetch-info.outputs.version_name}}.AppImage.zsync
release_web:
name: Release Web
@ -485,5 +520,5 @@ jobs:
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # Automatically provided by GitHub Actions
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/web