mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 13:38:13 -08:00
feature: AppImage release build (#245)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
7fbad0b0ce
commit
cfcedbcc42
4 changed files with 98 additions and 13 deletions
61
.github/workflows/build.yml
vendored
61
.github/workflows/build.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
7
.gitignore
vendored
7
.gitignore
vendored
|
|
@ -46,6 +46,13 @@ app.*.map.json
|
|||
# FVM Version Cache
|
||||
.fvm/
|
||||
|
||||
# AppImage
|
||||
/AppDir/
|
||||
/AppDirassets/
|
||||
/AppDiricons/
|
||||
/appimage-build/
|
||||
*.AppImage
|
||||
*.AppImage.zsync
|
||||
|
||||
# flatpak
|
||||
.flatpak-builder
|
||||
|
|
|
|||
12
.vscode/tasks.json
vendored
12
.vscode/tasks.json
vendored
|
|
@ -102,6 +102,18 @@
|
|||
// "runOptions": {
|
||||
// "runOn": "folderOpen"
|
||||
// }
|
||||
},
|
||||
{
|
||||
"label": "Build AppImage",
|
||||
"type": "shell",
|
||||
"command": "/usr/local/bin/appimage-builder",
|
||||
"args": [
|
||||
"--recipe",
|
||||
"AppImageBuilder.yml"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
}
|
||||
}
|
||||
],
|
||||
}
|
||||
31
AppImageBuilder.yml
Normal file
31
AppImageBuilder.yml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# appimage-builder recipe see https://appimage-builder.readthedocs.io for details
|
||||
# appimage-builder --recipe AppImageBuilder.yml
|
||||
# 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
|
||||
|
||||
# # install (optional)
|
||||
# sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder
|
||||
version: 1
|
||||
script:
|
||||
- rm -rf AppDir || true
|
||||
- cp -r build/linux/x64/release/bundle AppDir
|
||||
- mkdir -p AppDir/usr/share/icons/
|
||||
- cp icons/production/fladder_icon_desktop.png AppDir/usr/share/icons/
|
||||
AppDir:
|
||||
path: ./AppDir
|
||||
app_info:
|
||||
id: nl.jknaapen.fladder
|
||||
name: Fladder
|
||||
icon: fladder_icon_desktop
|
||||
version: latest
|
||||
exec: Fladder
|
||||
exec_args: $@
|
||||
files:
|
||||
include:
|
||||
- assets/fonts/rubik/Rubik-Italic-VariableFont_wght.ttf
|
||||
- assets/fonts/rubik/Rubik-VariableFont_wght.ttf
|
||||
- icons/production/fladder_icon_desktop.png
|
||||
AppImage:
|
||||
arch: x86_64
|
||||
update-information: gh-releases-zsync|DonutWare|Fladder|latest|Fladder-Linux-*.AppImage.zsync
|
||||
file_name: Fladder_x86_64.AppImage
|
||||
Loading…
Add table
Add a link
Reference in a new issue