forked from SwissBitcoinPay/boltcard-tools-terminal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
codemagic.yaml
122 lines (121 loc) · 3.76 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
workflows:
react-native-android:
name: Android
triggering:
events:
- push
cancel_previous_builds: true
max_build_duration: 120
instance_type: mac_mini_m1
environment:
android_signing:
- BoltCard Terminal Tools
groups:
- google_credentials
- testfairy
vars:
PACKAGE_NAME: "org.boltcardtools.terminal"
SKIP_BUNDLING: 1
java: 17.0.9
scripts:
- name: Save DEV variable
script: |
echo "DEV=$(if [ "$CM_BRANCH" != "main" ]; then echo true; else echo false; fi)" >> $CM_ENV
- name: Set Android SDK location
script: |
echo "sdk.dir=$ANDROID_SDK_ROOT" > "$CM_BUILD_DIR/android/local.properties"
- name: Install npm dependencies
script: |
npm install
- name: Build Android release
script: |
./scripts/build-android.sh
- name: Publishing to Testfairy
script: |
if [[ "$DEV" == "true" ]]
then
zip -q -r android_symbols.zip android/app/build/intermediates/symbol_list_with_package_name/release/package-aware-r.txt
./scripts/upload-to-testfairy.sh android/app/build/boltcard-tools-terminal.apk android_symbols.zip
fi
artifacts:
- android/app/build/outputs/**/*.aab
- android/app/build/**/*.apk
- android/app/build/**/outputs/**/mapping.txt
cache:
cache_paths:
- $CM_BUILD_DIR/node_modules
- $HOME/.gradle/caches
publishing:
email:
recipients:
notify:
success: true
failure: true
react-native-ios:
name: iOS
triggering:
events:
- push
cancel_previous_builds: true
max_build_duration: 120
instance_type: mac_mini_m1
environment:
xcode: 15.2
groups:
- testfairy
- appstore_credentials
- authkey
ios_signing:
provisioning_profiles:
- boltcard_tools_terminal_dev_provisioning
- boltcard_tools_terminal_prod_provisioning
certificates:
- boltcard_tools_terminal_dev_certificate
- boltcard_tools_terminal_prod_certificate
vars:
BUNDLE_ID: "org.boltcardtools.terminal"
XCODE_WORKSPACE: "BoltcardToolsTerminal.xcworkspace"
XCODE_PROJECT: "BoltcardToolsTerminal.xcodeproj"
XCODE_SCHEME: "BoltcardToolsTerminal"
APP_ID: 6475311437
java: 17.0.9
scripts:
- name: Save DEV variable
script: |
echo "DEV=$(if [ "$CM_BRANCH" != "main" ]; then echo true; else echo false; fi)" >> $CM_ENV
- name: Set Info.plist values
script: |
PLIST=$CM_BUILD_DIR/ios/$XCODE_SCHEME/Info.plist
PLIST_BUDDY=/usr/libexec/PlistBuddy
$PLIST_BUDDY -c "Add :ITSAppUsesNonExemptEncryption bool false" $PLIST
- name: Install npm dependencies
script: |
npm install
- name: Set versions
script: |
source .env
cd ios
agvtool new-marketing-version "$MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION"
agvtool new-version -all $BUILD_NUMBER
- name: Build iOS release
script: |
keychain unlock
./scripts/build-ios.sh
- name: Publishing to Testfairy
script: |
zip -r ios_symbols.zip ios/*.xcarchive/dSYMs/*.dSYM
./scripts/upload-to-testfairy.sh ios/export/BoltcardToolsTerminal.ipa ios_symbols.zip
artifacts:
- ios_symbols.zip
cache:
cache_paths:
- $CM_BUILD_DIR/node_modules
- $HOME/Library/Caches/CocoaPods
publishing:
email:
recipients:
notify:
success: true
failure: true