-
Notifications
You must be signed in to change notification settings - Fork 547
85 lines (73 loc) · 2.33 KB
/
flatpak.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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