-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcodemagic.yaml
200 lines (171 loc) · 5.8 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
workflows:
android-release:
name: Android Release
max_build_duration: 30
instance_type: linux_x2
environment:
android_signing:
- enmeshed-upload
groups:
- config-secrets
- webhook-secrets
- google_credentials
flutter: stable
java: 17
triggering:
events:
- tag
tag_patterns:
- pattern: "enmeshed-v+([0-9]).+([0-9]).+([0-9])"
include: true
cancel_previous_builds: false
scripts:
- name: Set up local.properties
script: echo "flutter.sdk=$HOME/programs/flutter" > "$CM_BUILD_DIR/apps/enmeshed/android/local.properties"
- name: Install melos
script: dart pub global activate melos
- name: Bootstrap repository
script: melos bootstrap
- name: Build appbundle with Flutter
script: |
BUILD_NUMBER=$(($(google-play get-latest-build-number --package-name "eu.enmeshed.app" --tracks="internal") + 1))
flutter build appbundle --release \
--build-number=$BUILD_NUMBER \
--build-name=${CM_TAG/#enmeshed-v/} \
--dart-define="app_baseUrl=$app_baseUrl" \
--dart-define="app_clientId=$app_clientId" \
--dart-define="app_clientSecret=$app_clientSecret"
working_directory: apps/enmeshed
- name: Build finished successfully
script: touch ~/SUCCESS
artifacts:
- apps/enmeshed/build/**/outputs/**/*.aab
- apps/enmeshed/build/**/outputs/**/mapping.txt
- apps/enmeshed/flutter_drive.log
publishing:
email:
recipients:
notify:
success: false
failure: true
google_play:
credentials: $GCLOUD_SERVICE_ACCOUNT_CREDENTIALS
track: internal
scripts:
- name: Custom MS-Teams integration publish
script: |
npm install -g @js-soft/[email protected]
jscm teams-production --platform "android" --projectName "enmeshed"
ios-release:
name: iOS Release
max_build_duration: 40
instance_type: mac_mini_m1
integrations:
app_store_connect: codemagic
triggering:
events:
- tag
tag_patterns:
- pattern: "enmeshed-v+([0-9]).+([0-9]).+([0-9])"
include: true
cancel_previous_builds: false
environment:
groups:
- config-secrets
- webhook-secrets
ios_signing:
distribution_type: app_store
bundle_identifier: eu.enmeshed.app
flutter: stable
xcode: 16.0
cocoapods: default
scripts:
- name: Set up code signing settings on Xcode project
script: xcode-project use-profiles
- name: Install melos
script: dart pub global activate melos
- name: Bootstrap repository
script: melos bootstrap
- name: Flutter build ipa
script: |
flutter build ipa --release \
--build-name=${CM_TAG/#enmeshed-v/} \
--export-options-plist=/Users/builder/export_options.plist \
--dart-define="app_baseUrl=$app_baseUrl" \
--dart-define="app_clientId=$app_clientId" \
--dart-define="app_clientSecret=$app_clientSecret"
working_directory: apps/enmeshed
- name: Build finished successfully
script: touch ~/SUCCESS
artifacts:
- apps/enmeshed/build/ios/ipa/*.ipa
- /tmp/xcodebuild_logs/*.log
- apps/enmeshed/flutter_drive.log
publishing:
email:
recipients:
notify:
success: false
failure: true
app_store_connect:
auth: integration
submit_to_testflight: true
scripts:
- name: Custom MS-Teams integration
script: |
npm install -g @js-soft/[email protected]
jscm teams-publish --platform "ios" --projectName "enmeshed"
windows-release:
name: Windows Release
max_build_duration: 30
instance_type: windows_x2
environment:
groups:
- config-secrets
- webhook-secrets
flutter: stable
triggering:
events: []
# - tag
# tag_patterns:
# - pattern: "enmeshed-v+([0-9]).+([0-9]).+([0-9])"
# include: true
# cancel_previous_builds: false
scripts:
- name: Install melos
script: dart pub global activate melos
- name: Bootstrap repository
script: melos bootstrap
- name: Build appbundle with Flutter
script: |
$VERSION = $CM_TAG -replace "enmeshed-v", ""
flutter config --enable-windows-desktop
flutter build windows --release --build-number=$PROJECT_BUILD_NUMBER --build-name=$VERSION --dart-define="app_baseUrl=$app_baseUrl" --dart-define="app_clientId=$app_clientId" --dart-define="app_clientSecret=$app_clientSecret"
cd build/windows/x64/runner/Release
7z a -r ../release.zip ./*
working_directory: apps/enmeshed
- name: Build msix package
script: |
$VERSION = $CM_TAG -replace "enmeshed-v", ""
flutter pub run msix:create --version "$VERSION.0"
working_directory: apps/enmeshed
- name: Build finished successfully
script: touch ~/SUCCESS
artifacts:
- apps/enmeshed/build/windows/x64/runner/release.zip
- apps/enmeshed/build/windows/**/*.msix
publishing:
email:
recipients:
notify:
success: true
failure: true
# TODO: this script does not support setting windows as a platform yet
# scripts:
# - name: Custom MS-Teams integration publish
# script: |
# npm install -g @js-soft/[email protected]
# jscm teams-production --platform "windows" --projectName "enmeshed"