-
-
Notifications
You must be signed in to change notification settings - Fork 136
/
codemagic.yaml
160 lines (128 loc) · 3.98 KB
/
codemagic.yaml
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
workflows:
flutter-ios-ci:
name: Flutter iOS CI
instance_type: mac_mini_m1
max_build_duration: 30
triggering:
events:
- push
- pull_request
branch_patterns:
- pattern: main
include: true
source: false
cancel_previous_builds: true
environment:
flutter: 3.24.4
xcode: latest
cocoapods: default
groups:
- Mobile
cache:
cache_paths:
- $FLUTTER_ROOT/.pub-cache
- $HOME/Library/Caches/CocoaPods
working_directory: mobile-app
scripts:
- name: Create .env file
script: |
echo "HASHNODE_PUBLICATION_ID=$HASHNODE_PUBLICATION_ID" > .env
echo "ALGOLIAAPPID=$ALGOLIAAPPID" >> .env
echo "ALGOLIAKEY=$ALGOLIAKEY" >> .env
echo "AUTH0_DOMAIN=$AUTH0_DOMAIN" >> .env
echo "AUTH0_CLIENT_ID=$AUTH0_CLIENT_ID" >> .env
- name: Setup FlutterFire CLI
script: dart pub global activate flutterfire_cli
- name: Install dependencies
script: flutter pub get
- name: Analyze code
script: flutter analyze
- name: Install applesimutils
script: |
brew tap wix/brew
brew install applesimutils
- name: Boot iOS simulator
script: |
xcrun simctl shutdown all
xcrun simctl boot "iPhone 15 Pro Max"
xcrun simctl bootstatus "iPhone 15 Pro Max"
- name: Run integration tests
script: dart integration_test_runner.dart --ios
- name: Move screenshots to artifacts
script: cp -r screenshots $CM_EXPORT_DIR
ignore_failure: true
- name: Build iOS app
script: flutter build ipa --release --no-codesign
publishing:
email:
recipients:
flutter-ios-deploy:
name: Deploy iOS App
instance_type: mac_mini_m1
max_build_duration: 30
triggering:
events:
- push
branch_patterns:
- pattern: prod
include: true
cancel_previous_builds: true
environment:
flutter: 3.24.4
xcode: latest
cocoapods: default
ios_signing:
distribution_type: app_store
bundle_identifier: org.freecodecamp.ios
groups:
- Mobile
cache:
cache_paths:
- $FLUTTER_ROOT/.pub-cache
- $HOME/Library/Caches/CocoaPods
working_directory: mobile-app
integrations:
app_store_connect: CodeMagic CI
scripts:
- name: Create .env file
script: |
echo "HASHNODE_PUBLICATION_ID=$HASHNODE_PUBLICATION_ID" > .env
echo "ALGOLIAAPPID=$ALGOLIAAPPID" >> .env
echo "ALGOLIAKEY=$ALGOLIAKEY" >> .env
echo "AUTH0_DOMAIN=$AUTH0_DOMAIN" >> .env
echo "AUTH0_CLIENT_ID=$AUTH0_CLIENT_ID" >> .env
- name: Setup FlutterFire CLI
script: dart pub global activate flutterfire_cli
- name: Install dependencies
script: flutter pub get
- name: Analyze code
script: flutter analyze
- name: Install applesimutils
script: |
brew tap wix/brew
brew install applesimutils
- name: Boot iOS simulator
script: |
xcrun simctl shutdown all
xcrun simctl boot "iPhone 15 Pro Max"
xcrun simctl bootstatus "iPhone 15 Pro Max"
- name: Run integration tests
script: dart integration_test_runner.dart --ios
- name: Move screenshots to artifacts
script: cp -r screenshots $CM_EXPORT_DIR
ignore_failure: true
- name: Set up code signing identities
script: xcode-project use-profiles
- name: Build iOS app
script: flutter build ipa --release --export-options-plist=/Users/builder/export_options.plist
artifacts:
- build/ios/ipa/*.ipa
publishing:
email:
recipients:
app_store_connect:
auth: integration
submit_to_testflight: true