-
Notifications
You must be signed in to change notification settings - Fork 0
/
codemagic.yaml
51 lines (51 loc) · 1.78 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
workflows:
react-native-android:
name: React native android
max_build_duration: 120
instance_type: mac_mini_m1
environment:
android_signing:
- davidKeystore
groups:
- google_play_credentials
vars:
PACKAGE_NAME: "io.codemagic.dtrdic4"
scripts:
- 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: Install Expo CLI and eject
script: |
npm install -g expo-cli
expo eject
- name: Set up app/build.gradle
script: |
mv ./support-files/build.gradle android/app
- name: Build Android release
script: |
LATEST_GOOGLE_PLAY_BUILD_NUMBER=$(google-play get-latest-build-number --package-name 'io.codemagic.dtrdic4')
if [ -z LATEST_BUILD_NUMBER ]; then
UPDATED_BUILD_NUMBER=$BUILD_NUMBER
else
UPDATED_BUILD_NUMBER=$(($LATEST_GOOGLE_PLAY_BUILD_NUMBER + 1))
fi
cd android
./gradlew bundleRelease \
-PversionCode=$UPDATED_BUILD_NUMBER \
-PversionName=1.0.$UPDATED_BUILD_NUMBER
artifacts:
- android/app/build/outputs/**/*.aab
publishing:
email:
recipients:
notify:
success: true
failure: false
google_play:
credentials: $GCLOUD_SERVICE_ACCOUNT_CREDENTIALS
track: internal
submit_as_draft: true