π Fix back button on tv #41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Flutter Linux App as AppImage | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-appimage: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Install Flutter SDK | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.24.3' | |
# Install AppImage and Linux dependencies | |
- name: Install AppImage and Linux dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libblkid-dev e2fslibs-dev liblzma-dev libmpv-dev mpv ninja-build fuse desktop-file-utils | |
wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage | |
chmod +x ./appimagetool-x86_64.AppImage | |
# Fetch Flutter dependencies | |
- name: Install Flutter dependencies | |
run: flutter pub get | |
# Run Flutter build for Linux | |
- name: Build Flutter Linux App | |
run: flutter build linux | |
- name: Upload a Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: linux-bin | |
path: build/linux/x64/release/bundle | |
# Ensure executable permissions | |
- name: Set executable permissions | |
run: chmod +x build/linux/x64/release/bundle/open_media_server_app | |
- run: | | |
mkdir -p assets/AppImage/usr/bin/ | |
cp -r build/linux/x64/release/bundle/** assets/AppImage/usr/bin/ | |
chmod +x assets/AppImage/AppRun | |
# Package the built Linux app into an AppImage | |
- name: Create AppImage | |
run: ARCH=x86_64 ./appimagetool-x86_64.AppImage assets/AppImage HelloWorld.AppImage | |
# Upload the AppImage as an artifact (optional) | |
- name: Upload AppImage artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: my-flutter-app.AppImage | |
path: '*.AppImage' | |
build-apk: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
# Install Flutter SDK | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.24.3' | |
# Fetch Flutter dependencies | |
- name: Install Flutter dependencies | |
run: flutter pub get | |
# Run Flutter build for Linux | |
- name: Build Flutter Linux App | |
run: flutter build apk | |
- run: ls -R | |
# Upload the AppImage as an artifact | |
- name: Upload AppImage artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: my-flutter-app.apk | |
path: "./build/app/outputs/apk/release/app-release.apk" | |
build-web: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Install Flutter SDK | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.24.3' | |
# Fetch Flutter dependencies | |
- name: Install Flutter dependencies | |
run: flutter pub get | |
- run: flutter build web | |
working-directory: ./ | |
shell: bash | |
- name: Upload a Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: web | |
path: ./build/web/ |