diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml new file mode 100644 index 00000000000..af663217924 --- /dev/null +++ b/.github/workflows/flatpak.yml @@ -0,0 +1,85 @@ +name: Build Flatpak + +on: + workflow_dispatch: + #push: + # branches: + # - master + +env: + project-id: com.invoiceninja.app + +jobs: + build-flutter-app: + name: Build Flutter app + env: + api_secret: ${{secrets.api_secret}} + runs-on: ubuntu-20.04 + steps: + - name: Checkout code + uses: actions/checkout@v3 + + #- name: Install Flutter dependencies + # run: | + # sudo apt-get update + # sudo apt-get install -y libgtk-3-dev libx11-dev pkg-config cmake ninja-build libblkid-dev + + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: '3.13.6' + #channel: 'stable' + + - name: Init Flutter + run: | + flutter doctor -v + flutter pub get + + - name: Prepare App + run: | + cp lib/.env.dart.example lib/.env.dart + sed -i 's/secret/${{secrets.api_secret}}/g' lib/.env.dart + echo "const FLUTTER_VERSION = const " > lib/flutter_version.dart + flutter --version --machine >> lib/flutter_version.dart + echo ";" >> lib/flutter_version.dart + + - name: Build Flutter linux version + #working-directory: ${{ github.workspace }}/counter_app + run: | + archiveName=Invoice-Ninja-Linux-Portable.tar.gz + baseDir=$(pwd) + + flutter build linux + + cd build/linux/x64/release/bundle || exit + tar -czaf $archiveName ./* + mv $archiveName "$baseDir"/ + + - name: Upload app archive to workflow + uses: actions/upload-artifact@v3 + with: + name: Invoice-Ninja-Archive + path: Invoice-Ninja-Linux-Portable.tar.gz + +# build-flatpak: +# name: Build flatpak +# needs: build-flutter-app +# runs-on: ubuntu-latest +# container: +# image: bilelmoussaoui/flatpak-github-actions:freedesktop-22.08 +# options: --privileged +# steps: +# - name: Checkout code +# uses: actions/checkout@v3 +# +# - name: Build .flatpak +# uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v5 +# with: +# bundle: FlutterApp.flatpak +# manifest-path: flathub_repo/com.example.FlutterApp.yml +# +# - name: Upload .flatpak artifact to workflow +# uses: actions/upload-artifact@v3 +# with: +# name: Flatpak artifact +# path: FlutterApp.flatpak \ No newline at end of file diff --git a/flatpak/com.invoiceninja.app.desktop b/flatpak/com.invoiceninja.app.desktop new file mode 100644 index 00000000000..1b9f9a99f1d --- /dev/null +++ b/flatpak/com.invoiceninja.app.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=1.0 +Type=Application + +Name=Invoice Ninja +Comment=An example app that counts +Categories=Utility;Amusement; + +Icon=com.example.FlutterApp +Exec=flutter_flatpak_example +Terminal=false +StartupWMClass=flutter_flatpak_example \ No newline at end of file diff --git a/flatpak/com.invoiceninja.app.metainfo.xml b/flatpak/com.invoiceninja.app.metainfo.xml new file mode 100644 index 00000000000..8a463263448 --- /dev/null +++ b/flatpak/com.invoiceninja.app.metainfo.xml @@ -0,0 +1,43 @@ + + + + com.example.FlutterApp + Flutter App + An example app that counts + Kristen McWilliam + https://github.com/Merrit/flutter_flatpak_example + MIT + MIT + + pointing + keyboard + touch + + +

Fast and beautiful counting app. For all your counting needs!

+

Features

+
    +
  • Counts!
  • +
  • Cooks!
  • +
  • Cleans!
  • +
  • Comets!
  • +
  • Dinosaurs!
  • +
  • .. Burritos?
  • +
  • Burritos!!
  • +
  • +
+
+ com.example.FlutterApp.desktop + + + https://raw.githubusercontent.com/Merrit/flutter_flatpak_example/main/screenshots/screenshot.png + + + + + + +
\ No newline at end of file