forked from Apolline-Lille/apolline-flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (102 loc) · 3.33 KB
/
flutter_ci.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Flutter CI
on:
push:
branches-ignore:
- master
- develop
pull_request:
env:
FLUTTER_VERSION: '2.5.0'
jobs:
lint:
name: "Static code analysis"
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/[email protected]
- name: Install Java
uses: actions/setup-java@v1
with:
java-version: '12.x'
- name: Install Flutter
uses: subosito/flutter-action@v1
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Generate configuration file
env:
APOLLINE_API_URL: ${{ secrets.APOLLINE_API_URL }}
APOLLINE_PASSWORD: ${{ secrets.APOLLINE_PASSWORD }}
APOLLINE_USERNAME: ${{ secrets.APOLLINE_USERNAME }}
APOLLINE_DBNAME: ${{ secrets.APOLLINE_DBNAME }}
run: dart scripts/configuration_generation.dart
- name: Install dependencies
run: flutter pub get
working-directory: apolline-flutter
- name: Run lint analysis
run: flutter analyze
working-directory: apolline-flutter
build-android:
name: "Build Android apk"
runs-on: ubuntu-latest
needs:
- lint
steps:
- name: Check out repository
uses: actions/[email protected]
- name: Install Java
uses: actions/setup-java@v1
with:
java-version: '12.x'
- name: Install Flutter
uses: subosito/flutter-action@v1
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Generate configuration file
env:
APOLLINE_API_URL: ${{ secrets.APOLLINE_API_URL }}
APOLLINE_PASSWORD: ${{ secrets.APOLLINE_PASSWORD }}
APOLLINE_USERNAME: ${{ secrets.APOLLINE_USERNAME }}
APOLLINE_DBNAME: ${{ secrets.APOLLINE_DBNAME }}
run: dart scripts/configuration_generation.dart
- name: Install dependencies
run: flutter pub get
working-directory: apolline-flutter
- name: Build Apolline APK
run: flutter build apk --debug
working-directory: apolline-flutter
- name: Save build artefact
uses: actions/upload-artifact@v1
with:
name: Apolline.apk
path: apolline-flutter/build/app/outputs/apk/debug/app-debug.apk
build-iOS:
name: Build iOS package
runs-on: macos-latest
needs:
- lint
steps:
- name: Check out repository
uses: actions/[email protected]
- name: Install Java
uses: actions/setup-java@v1
with:
java-version: '12.x'
- name: Install Flutter
uses: subosito/flutter-action@v1
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Generate configuration file
env:
APOLLINE_API_URL: ${{ secrets.APOLLINE_API_URL }}
APOLLINE_PASSWORD: ${{ secrets.APOLLINE_PASSWORD }}
APOLLINE_USERNAME: ${{ secrets.APOLLINE_USERNAME }}
APOLLINE_DBNAME: ${{ secrets.APOLLINE_DBNAME }}
run: dart scripts/configuration_generation.dart
- name: Build iOS Apolline package
run: flutter build ios --release --no-codesign
working-directory: apolline-flutter
- name: Save build artefact
uses: actions/upload-artifact@v1
with:
name: Apolline.app
path: apolline-flutter/build/ios/iphoneos/Runner.app