Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Oct 31, 2023
2 parents ed71990 + dc490a9 commit abd70b1
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 0 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
@@ -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 <String, String>" > 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
12 changes: 12 additions & 0 deletions flatpak/com.invoiceninja.app.desktop
Original file line number Diff line number Diff line change
@@ -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
43 changes: 43 additions & 0 deletions flatpak/com.invoiceninja.app.metainfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Generator for metainfo & .desktop files:
https://www.freedesktop.org/software/appstream/metainfocreator/#/
-->
<component type="desktop-application">
<id>com.example.FlutterApp</id>
<name>Flutter App</name>
<summary>An example app that counts</summary>
<developer_name>Kristen McWilliam</developer_name>
<url type="homepage">https://github.com/Merrit/flutter_flatpak_example</url>
<metadata_license>MIT</metadata_license>
<project_license>MIT</project_license>
<supports>
<control>pointing</control>
<control>keyboard</control>
<control>touch</control>
</supports>
<description>
<p>Fast and beautiful counting app. For all your counting needs!</p>
<p>Features</p>
<ul>
<li>Counts!</li>
<li>Cooks!</li>
<li>Cleans!</li>
<li>Comets!</li>
<li>Dinosaurs!</li>
<li>.. Burritos?</li>
<li>Burritos!!</li>
<li></li>
</ul>
</description>
<launchable type="desktop-id">com.example.FlutterApp.desktop</launchable>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/Merrit/flutter_flatpak_example/main/screenshots/screenshot.png</image>
</screenshot>
</screenshots>
<content_rating type="oars-1.1" />
<releases>
<release version="1.0.0" date="2022-02-25" />
</releases>
</component>

0 comments on commit abd70b1

Please sign in to comment.