forked from solutelabs/android-kotlin-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
codemagic.yaml
117 lines (117 loc) · 9.52 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
workflows:
development:
name: Development
scripts:
- |
# set up debug keystore
rm -f ~/.android/debug.keystore
keytool -genkeypair \
-alias androiddebugkey \
-keypass android \
-keystore ~/.android/debug.keystore \
-storepass android \
-dname 'CN=Android Debug,O=Android,C=US' \
-keyalg 'RSA' \
-keysize 2048 \
-validity 10000
- name: Set up local properties
script: echo "sdk.dir=$HOME/programs/android-sdk-macosx" > "$FCI_BUILD_DIR/local.properties"
- name: Build Android app
script: ./gradlew assembleDevelopmentRelease
artifacts:
- build/**/outputs/**/*.apk
- build/**/outputs/**/*.aab
- build/**/outputs/**/mapping.txt
- flutter_drive.log
publishing:
email:
recipients:
staging:
name: Staging
scripts:
- |
# set up debug keystore
rm -f ~/.android/debug.keystore
keytool -genkeypair \
-alias androiddebugkey \
-keypass android \
-keystore ~/.android/debug.keystore \
-storepass android \
-dname 'CN=Android Debug,O=Android,C=US' \
-keyalg 'RSA' \
-keysize 2048 \
-validity 10000
- name: Set up local properties
script: echo "sdk.dir=$HOME/programs/android-sdk-macosx" > "$FCI_BUILD_DIR/local.properties"
- name: Build Android app
script: ./gradlew assembleStagingRelease
artifacts:
- build/**/outputs/**/*.apk
- build/**/outputs/**/*.aab
- build/**/outputs/**/mapping.txt
- flutter_drive.log
publishing:
email:
recipients:
production-adhoc:
name: Production - Local Distribution
scripts:
- |
# set up debug keystore
rm -f ~/.android/debug.keystore
keytool -genkeypair \
-alias androiddebugkey \
-keypass android \
-keystore ~/.android/debug.keystore \
-storepass android \
-dname 'CN=Android Debug,O=Android,C=US' \
-keyalg 'RSA' \
-keysize 2048 \
-validity 10000
- name: Set up local properties
script: echo "sdk.dir=$HOME/programs/android-sdk-macosx" > "$FCI_BUILD_DIR/local.properties"
- name: Build Android app
script: ./gradlew assembleProductionRelease
artifacts:
- build/**/outputs/**/*.apk
- build/**/outputs/**/*.aab
- build/**/outputs/**/mapping.txt
- flutter_drive.log
publishing:
email:
recipients:
production-store:
name: Production - Store Distribution
environment:
vars:
FCI_KEYSTORE_PATH: /tmp/keystore.keystore
FCI_KEYSTORE: Encrypted(Z0FBQUFBQmdZQjZwZkxFT2s3Y3NTN0lUME8xdUpUc1pMS2V1Rm45bUlxX3ZmNTZlTlN5b0RJZXpiUnJoSEp3SDZDSUk2dEREbDhMZ2ZYTWxEUllMY2VfMm5HU3JtMEtJcHVfQi1Vc0xVS3NIUUFhQXF3LUVnYWVSVDdmWEJ5MjNMNUs0VzNmUVJ2UlJ4YUxzYzY0VDJMOWE1bEh4TG5zUDdMQTd1WEtGWmp5Mk5RckdyODVNdFJNTkxORHY4TkNqcVNlV1AxWUc1Mmx0N2hnSDIyUGJKYVg4aGFIR25taDROOUdGX2RYVVM1Uy1uVXFlZnZIT3N2YUpJTzNqNzhRRFZYRUlxYkdKb2wzSUgtWEg3ajBFd1dZSW16YnVkQXN2Z2xSNFYzcXd4aTJUdmdQV0VJTFJxM0lVMGRIS0pfRFlzR1E3NEpGQUtSTG9yWEhic1V6WlNTVXl5QTlCekx1eThva21pcUtqTldNaTA0QVFSV1pfc0FFbkRKclFsdTd0a0kyN2k4QXhmcjVsaVNpYk9aZHItdGFDbzR0a1hKblY5bk9YYUNnM2ZqMUlUakpVN1l1bFhJWDYxVnNwVm5kekdqOWQzN1piWWJLbzBXemFWOEZQVHNUcUZUc0lXVFV2UjFZajZFWi1MdE04OFAwTGhJVTE2aUU0SU5jUjRMTk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
scripts:
- name: Set up local properties
script: echo "sdk.dir=$HOME/programs/android-sdk-macosx" > "$FCI_BUILD_DIR/local.properties"
- name: Set up key.properties file for code signing
script: |
echo $FCI_KEYSTORE | base64 --decode > $FCI_KEYSTORE_PATH
cat >> "$FCI_BUILD_DIR/key.properties" <<EOF
storePassword=$FCI_KEYSTORE_PASSWORD
keyPassword=$FCI_KEY_PASSWORD
keyAlias=$FCI_KEY_ALIAS
storeFile=$FCI_KEYSTORE_PATH
EOF
- name: Build Android app
script: ./gradlew bundleProductionRelease
artifacts:
- build/**/outputs/**/*.apk
- build/**/outputs/**/*.aab
- build/**/outputs/**/mapping.txt
- flutter_drive.log
publishing:
email:
recipients: