-
Notifications
You must be signed in to change notification settings - Fork 5
/
.gitlab-ci.yml
87 lines (78 loc) · 3.11 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
image: cirrusci/flutter:latest
variables:
GRADLE_OPTS: "-Xmx2g -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
DOCKER_TLS_CERTDIR: "" #https://gitlab.com/gitlab-org/gitlab-foss/issues/64959#note_194582424
#cache:
# paths:
# - ~/.pub-cache
stages:
- setup
- build_test
- test
- deploy
- deploy_store
setup:
stage: setup
script:
- flutter doctor
build:
stage: build_test
script:
- flutter build apk -t lib/application/main_production.dart --release --flavor production
before_script:
# intl_message.arb生成
- flutter pub get
- flutter pub pub run intl_translation:extract_to_arb --output-dir=lib/l10n lib/l10n/strings.dart
- flutter pub pub run intl_translation:generate_from_arb --output-dir=lib/l10n --no-use-deferred-loading lib/l10n/strings.dart lib/l10n/intl_messages.arb lib/l10n/intl_ja.arb
# json パース用ファイル生成
# https://github.com/dart-lang/json_serializable/tree/master/example
- flutter pub pub run build_runner build
- dart tool/env.dart
artifacts:
paths:
- build/app/outputs/apk
test:
stage: build_test
script:
- flutter test
before_script:
# intl_message.arb生成
- flutter pub get
- flutter pub pub run intl_translation:extract_to_arb --output-dir=lib/l10n lib/l10n/strings.dart
- flutter pub pub run intl_translation:generate_from_arb --output-dir=lib/l10n --no-use-deferred-loading lib/l10n/strings.dart lib/l10n/intl_messages.arb lib/l10n/intl_ja.arb
# json パース用ファイル生成
# https://github.com/dart-lang/json_serializable/tree/master/example
- flutter pub pub run build_runner build
- dart tool/env.dart
deploy_production:
stage: deploy
environment: Production
only:
- master
before_script:
- flutter pub get
- flutter pub pub run intl_translation:extract_to_arb --output-dir=lib/l10n lib/l10n/strings.dart
- flutter pub pub run intl_translation:generate_from_arb --output-dir=lib/l10n --no-use-deferred-loading lib/l10n/strings.dart lib/l10n/intl_messages.arb lib/l10n/intl_ja.arb
# json パース用ファイル生成
# https://github.com/dart-lang/json_serializable/tree/master/example
- flutter pub pub run build_runner build
- dart tool/env.dart
- flutter build apk -t lib/application/main_production.dart --release --flavor production
script:
- cd android && bundle exec fastlane dg
deploy_store:
stage: deploy
environment: Production
only:
- release
before_script:
- flutter pub get
- flutter pub pub run intl_translation:extract_to_arb --output-dir=lib/l10n lib/l10n/strings.dart
- flutter pub pub run intl_translation:generate_from_arb --output-dir=lib/l10n --no-use-deferred-loading lib/l10n/strings.dart lib/l10n/intl_messages.arb lib/l10n/intl_ja.arb
# json パース用ファイル生成
# https://github.com/dart-lang/json_serializable/tree/master/example
- flutter pub pub run build_runner build
- dart tool/env.dart
- flutter build apk -t lib/application/main_production.dart --release --flavor production
script:
- cd android && bundle exec fastlane beta