-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcodemagic.yaml
More file actions
131 lines (130 loc) · 3.69 KB
/
codemagic.yaml
File metadata and controls
131 lines (130 loc) · 3.69 KB
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
workflows:
react-native-android:
name: Android
triggering:
events:
- push
branch_patterns:
- pattern: "translations"
include: false
cancel_previous_builds: true
when:
changeset:
includes:
- ".env"
max_build_duration: 120
instance_type: mac_mini_m2
environment:
java: 17.0.15
android_signing:
- Swiss Bitcoin Pay Checkout
groups:
- google_credentials
- testfairy
- sentry
vars:
PACKAGE_NAME: "ch.swissbitcoinpay.checkout"
SKIP_BUNDLING: 1
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/processReleaseResources/package-aware-r.txt
./scripts/upload-to-testfairy.sh android/app/build/swiss-bitcoin-pay.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:
- hello@swiss-bitcoin-pay.ch
notify:
success: true
failure: true
react-native-ios:
name: iOS
triggering:
events:
- push
branch_patterns:
- pattern: "translations"
include: false
cancel_previous_builds: true
when:
changeset:
includes:
- ".env"
max_build_duration: 120
instance_type: mac_mini_m2
environment:
xcode: 16.4
java: 17.0.15
groups:
- testfairy
- appstore_credentials
- authkey
- sentry
ios_signing:
provisioning_profiles:
- dev_provisioning
- prod_provisioning
certificates:
- dev_certificate
- prod_certificate
vars:
BUNDLE_ID: "ch.swissbitcoinpay.checkout"
XCODE_WORKSPACE: "SwissBitcoinPay.xcworkspace"
XCODE_PROJECT: "SwissBitcoinPay.xcodeproj"
XCODE_SCHEME: "SwissBitcoinPay"
APP_ID: 6444370155
scripts:
- name: Save DEV variable
script: |
echo "DEV=$(if [ "$CM_BRANCH" != "main" ]; then echo true; else echo false; fi)" >> $CM_ENV
- name: Install npm dependencies
script: |
npm install
- name: Set versions
script: |
source .env
cd ios
agvtool new-marketing-version "$APP_VERSION"
agvtool new-version -all "$APP_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/SwissBitcoinPay.ipa ios_symbols.zip
cache:
cache_paths:
- $CM_BUILD_DIR/node_modules
- $HOME/Library/Caches/CocoaPods
publishing:
email:
recipients:
- hello@swiss-bitcoin-pay.ch
notify:
success: true
failure: true