-
Notifications
You must be signed in to change notification settings - Fork 78
/
.gitlab-ci.yml
54 lines (49 loc) · 1.36 KB
/
.gitlab-ci.yml
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
stages:
- build
variables:
VERSION: 0.3.0-30
POST_MESSAGE: "Pipeline Trigger: ${CI_PIPELINE_SOURCE}\n
Branch: ${CI_COMMIT_REF_NAME}\n
Commit: ${CI_COMMIT_SHA}\n
${CI_COMMIT_MESSAGE}"
Android:debug:
except:
refs:
- master
tags: ["Mobile"]
stage: build
script:
- sed -i -e "s/PUT_KEY_HERE/${ETHERSCAN_API_KEY}/g" env/main.android.json
- sed -i -e "s/PUT_ID_HERE/${INFURA_PROJECT_ID}/g" env/main.android.json
- yarn install
- yarn run bundle-android
- cd android && ./gradlew assembleDebug
artifacts:
paths:
- android/app/build
- yarn-lock.json
Android:release:
only:
refs:
- master
tags: ["Mobile"]
variables:
RELEASE: 1
stage: build
script:
- sed -i -e "s/PUT_KEY_HERE/${ETHERSCAN_API_KEY}/g" env/main.android.json
- sed -i -e "s/PUT_ID_HERE/${INFURA_PROJECT_ID}/g" env/main.android.json
- yarn install
- cd android
- echo ${KEYSTORE} | xxd -r -p - > app/${MYAPP_RELEASE_STORE_FILE}
- ./gradlew assembleRelease
- rm app/${MYAPP_RELEASE_STORE_FILE}
after_script:
- curl -F file=@"android/app/build/outputs/apk/release/VerusMobile-${VERSION}.apk"
-F channels="${CHANNEL}"
-F initial_comment="${POST_MESSAGE}"
-H "${SLACK_BOT_AUTH}"
"https://slack.com/api/files.upload"
artifacts:
paths:
- android/app/build/outputs/apk/release