forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodemagic.yaml
86 lines (85 loc) · 3.47 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
workflows:
react-native-android:
name: React Native Android
max_build_duration: 120
# instance_type: linux_x2
environment:
android_signing:
- codemagic_keystore
vars:
PACKAGE_NAME: "io.codemagic.sample.reactnative" # <-- Put your package name here e.g. com.domain.myapp
node: 20.10.0
npm: 10.2.3
java: 17
xcode: 15.4
# cache:
# cache_paths:
# - $CM_BUILD_DIR/node_modules
scripts:
- name: Install npm dependencies
script: |
npm install --legacy-peer-deps
- name: Set Android SDK location
script: |
echo "sdk.dir=$ANDROID_SDK_ROOT" > "$CM_BUILD_DIR/android/local.properties"
- name: Build Android release
script: |
cd android
./gradlew assembleDebug
artifacts:
- android/app/build/outputs/**/*.aab
- android/app/build/outputs/**/*.apk
react-native-ios:
name: React Native iOS
max_build_duration: 120
# instance_type: mac_mini_m2
# integrations:
# app_store_connect: codemagic
environment:
ios_signing:
distribution_type: app_store
bundle_identifier: io.cm.expensify.chat
vars:
XCODE_WORKSPACE: "NewExpensify.xcworkspace" # <-- Put the name of your Xcode workspace here
XCODE_SCHEME: "NewExpensify" # <-- Put the name of your Xcode scheme here
APP_ID: 1555555551 # <-- Put the app id number here. This is found in App Store Connect > App > General > App Information
node: 20.10.0
npm: 10.2.3
xcode: 16.1
# xcode: latest
# cocoapods: default
cache:
cache_paths:
- $HOME/Library/Caches/CocoaPods
- $CM_BUILD_DIR/node_modules
scripts:
- name: Install npm dependencies
script: |
npm install --legacy-peer-deps
- name: Install CocoaPods dependencies
script: |
cd ios && pod install
# - name: Set Info.plist values
# script: |
# # This allows publishing without manually answering the question about encryption
# PLIST=$CM_BUILD_DIR/$XCODE_SCHEME/Info.plist
# PLIST_BUDDY=/usr/libexec/PlistBuddy
# $PLIST_BUDDY -c "Add :ITSAppUsesNonExemptEncryption bool false" $PLIST
- name: Set up code signing settings on Xcode project
script: |
xcode-project use-profiles --project=$CM_BUILD_DIR/ios/NewExpensify.xcodeproj
# - name: Increment build number
# script: |
# cd $CM_BUILD_DIR/ios
# LATEST_BUILD_NUMBER=$(app-store-connect get-latest-app-store-build-number "$APP_ID")
# agvtool new-version -all $(($LATEST_BUILD_NUMBER + 1))
- name: Build ipa for distribution
script: |
xcode-project build-ipa \
--workspace "$CM_BUILD_DIR/ios/$XCODE_WORKSPACE" \
--scheme "$XCODE_SCHEME"
artifacts:
- build/ios/ipa/*.ipa
- /tmp/xcodebuild_logs/*.log
- $HOME/Library/Developer/Xcode/DerivedData/**/Build/**/*.app
- $HOME/Library/Developer/Xcode/DerivedData/**/Build/**/*.dSYM