-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
94 lines (85 loc) · 1.87 KB
/
.gitlab-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
image:
name: cirrusci/flutter
stages:
- coverage
- release
- deploy
.add_api_key: &add_api_key |-
LASTHASH=$(git rev-parse HEAD)
printf "abstract class InstancesApiToken {\n static const String token = '$INSTANCES_API_KEY';\n}" > lib/config/instances_api_token.dart
code_analyze:
stage: coverage
script:
- flutter pub get
- flutter format lib/ test/ --set-exit-if-changed
- flutter pub run import_sorter:main --no-comments --exit-if-changed
- flutter analyze
test:
stage: coverage
script: [flutter test]
build_web:
image: cirrusci/flutter
stage: coverage
before_script: [*add_api_key]
script:
- flutter pub get
- flutter build web --release --verbose --web-renderer html
artifacts:
paths:
- build/web/
build_apk_debug:
stage: coverage
before_script:
- *add_api_key
- ./scripts/prepare-android-release.sh
script:
- flutter pub get
- flutter build apk
artifacts:
when: on_success
paths:
- build/app/outputs/apk/debug/app-release.apk
except:
- main
- tags
build_apk:
stage: coverage
before_script:
- *add_api_key
- ./scripts/prepare-android-release.sh
script:
- flutter pub get
- flutter build apk --release
artifacts:
when: on_success
paths:
- build/app/outputs/apk/release/app-release.apk
only:
- main
- tags
build_appbundle:
stage: coverage
before_script:
- *add_api_key
- ./scripts/prepare-android-release.sh
script:
- ./scripts/release-playstore-beta.sh
artifacts:
when: on_success
paths:
- build/app/outputs/bundle/release/app-release.aab
resource_group: playstore_release
only:
- main
- tags
pages:
stage: deploy
image: ruby:latest
script:
- sed -i 's/href="\/"/href="\/fluffypix\/"/' build/web/index.html
- mv build/web/ public/
artifacts:
paths:
- public
only:
- main