-
Notifications
You must be signed in to change notification settings - Fork 25
/
codemagic.yaml
71 lines (68 loc) · 8.58 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
# Automatically generated on 2021-03-12 UTC from https://codemagic.io/app/604564acbe2f9fb72766d730/settings
# Note that this configuration is not an exact match to UI settings. Review and adjust as necessary.
workflows:
android-workflow:
name: Android Build Workflow
max_build_duration: 60
environment:
flutter: v2.0.1
# xcode: latest
# cocoapods: default
vars:
FCI_KEYSTORE_PATH: /tmp/keystore.keystore
FCI_KEYSTORE: Encrypted(Z0FBQUFBQmdTOC02ZFU3WWcxMUxBYzdGb25pX1lHRU0tZDd4OENvOWVhZHFsWjVtbVhaM19QOENMVmM2MUVURnVCYmFncHBPMDVlMlVLaFNjQ0NpZDV2cnpaYmJVY29ENktDS2tEVy14M3dfSmdlQ1RzVjEwOFB0cVV0R1JjYnJhLUJ5VUhWQnVYTjg3bVZ4Y2M4eFRnQWhXdWtycjNtQ1VUTlJJWXpEQ2NqV2htc0ptaXg1SzNjRjVsUFN0bFFUZEtZYXctNnI3THhNSUxwS1J2SzY2VERUSVQtaXNLaUl4a0pOLWtDdTZBU1NXbHNDZmFmZmVYRXl4NnFCQWQ5UmQ3MTRyYXVHemZzZ2N4c0xncGtPQ0I0Zm1iaFhMWUVSUGVOMGNIUHlGZFJqX3Jzc1laTWxyazIxeTlLVFp3cEN5OHpzM0tmQ0VUTmp2RU5Tc0dTMlNxUnFuSTJ3b3NLMTlNTTdXX1BvYVlTanN1b1hXWmV1dkVLTF9hRjBfMTlZTkFWVGlNUlZmcDdyS3ZmTGZSdV9wVXJ3Ml85N2dlUWxQb1RnM1VXVVJvLUJYWHYydVpHT3QyMExXdjNkVTBrdXRiU0M1bHMwSnhNZG43RkpaZ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hFNnF4Y0p6UU1DWnRvQmhkYUw1bHRyZzZhMXZOdmg4S2JDVnBMVjFwSWJNbUZpbVZUeUk2Q29ob1JKZWRJaGVnNkdjeG5vankwcXFLeFZzVlhReGMzVDhuaWpKWVU3M2FvTUZ0eU9keGp4OC03NXNoRXNaRnZPSGFqN3BBOVZPaGtScG83MG50RWY5aS00UG40UDNJcnpDeThZQUliVVc0cWUwWDJnbXdpeWNSOEFOelFncnVkb0R5c3lCMTVxbk5hWVpRNFBYeXBGWFZhRzctYUZObUVlVnVSMHJ4emlxWHhOMGh3MGhoaUZ4RnJCUXJsZjRGTFpENTl6cFBZNFhaNWlfSVRKN3RNX19tZ3MzRG1mMDRmUlk2M2JKNU9RRzNuaVZUbmFJNUFhVWQyZWsyakgzVmVlcFJfdkVkVXhabmV2STBkYXNJMFhMM24yQXdFTGhmM0JsaUV2ckV5LVQ0U3FPQ1Byc3dVSEhBbkJxV2ZJY2IxTHUzZWtIWkRtSkZkWmZITDBxdWViRVpP)
FCI_KEYSTORE_PASSWORD: Encrypted(Z0FBQUFBQmdTOF9lVEphV1BIc294SXYzZGhzMmNoQ01aX0Jlb1duMnlka3AwM3dydnluMldPM2xNTXpEZDlDc19rbTgtU1lDMW16aWtLVFNVRkZnTnUzSndhMHU1a1FqTWc9PQ==)
FCI_KEY_PASSWORD: Encrypted(Z0FBQUFBQmdTOF9lVEphV1BIc294SXYzZGhzMmNoQ01aX0Jlb1duMnlka3AwM3dydnluMldPM2xNTXpEZDlDc19rbTgtU1lDMW16aWtLVFNVRkZnTnUzSndhMHU1a1FqTWc9PQ==)
FCI_KEY_ALIAS: Encrypted(Z0FBQUFBQmdTOF8xdmltNGVPdWF3WGotUmxqNjJfMU1EdTY0eWJVT0tXUjdVajNHVlZjMmlvRHc1NFYzSmJUTF9OZEJ2aVhobVAycE8zR1UtUEFUSXNmM3lMcTZ4Wm1iTnc9PQ==)
triggering:
events:
- tag
branch_patterns:
- pattern: '*'
include: true
source: true
scripts:
- name: Set up key.properties
script: |
echo $FCI_KEYSTORE | base64 --decode > "$FCI_KEYSTORE_PATH"
cat > "$FCI_BUILD_DIR/android/key.properties" <<EOF
storePassword=$FCI_KEYSTORE_PASSWORD
keyPassword=$FCI_KEY_PASSWORD
keyAlias=$FCI_KEY_ALIAS
storeFile=$FCI_KEYSTORE_PATH
EOF
- name: Set up local.properties
script: echo "flutter.sdk=$HOME/programs/flutter" > "$FCI_BUILD_DIR/android/local.properties"
# Build binaries
- cd "$FCI_BUILD_DIR" && flutter packages pub get
- cd "$FCI_BUILD_DIR" && flutter build apk --release --split-per-abi
- cd "$FCI_BUILD_DIR" && flutter build apk --release --target-platform=android-arm64,android-arm
- name: Generate sha256sum per-file
script: |
mkdir sha256_sums
for file in app-{,arm64-v8a-,armeabi-v7a-,x86_64-}release.apk; do
openssl dgst -sha256 "${FCI_BUILD_DIR}/build/app/outputs/flutter-apk/${file}"| sed -E 's/.+ ([0-9a-f]+)/\1/' > "${FCI_BUILD_DIR}/sha256_sums/sha256-${file}.txt"
done
artifacts:
- build/app/outputs/flutter-apk/app-release.apk
- build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
- build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk
- build/app/outputs/flutter-apk/app-x86_64-release.apk
- sha256_sums/sha256-app-release.apk.txt
- sha256_sums/sha256-app-arm64-v8a-release.apk.txt
- sha256_sums/sha256-app-armeabi-v7a-release.apk.txt
- sha256_sums/sha256-app-x86_64-release.apk.txt
publishing:
github_releases:
prerelease: false
artifact_patterns:
- build/app/outputs/flutter-apk/app-release.apk
- build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
- build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk
- build/app/outputs/flutter-apk/app-x86_64-release.apk
- sha256_sums/sha256-app-release.apk.txt
- sha256_sums/sha256-app-arm64-v8a-release.apk.txt
- sha256_sums/sha256-app-armeabi-v7a-release.apk.txt
- sha256_sums/sha256-app-x86_64-release.apk.txt
scripts:
- rm -rf "$FCI_BUILD_DIR/sha256_sums/"