-
Notifications
You must be signed in to change notification settings - Fork 547
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
140 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
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
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 |
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
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> |