-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
36 lines (30 loc) · 905 Bytes
/
.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
stages:
- build
image: jangrewe/gitlab-ci-android
variables:
GRADLE_USER_HOME: "$CI_PROJECT_DIR/.gradle"
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- "$GRADLE_USER_HOME"
before_script:
- chmod +x gradlew
buildDebug:
stage: build
script:
- ./gradlew assembleDebug
- cp app/build/outputs/apk/debug/app-debug.apk app-debug.apk
artifacts:
when: on_success
paths:
- app-debug.apk
buildRelease:
stage: build
script:
- echo $KEYSTORE_FILE | base64 -d > keystore
- ./gradlew assembleRelease -Pandroid.injected.signing.store.file=$CI_PROJECT_DIR/keystore -Pandroid.injected.signing.store.password=$KEYSTORE_PASSWORD -Pandroid.injected.signing.key.alias=$KEY_ALIAS -Pandroid.injected.signing.key.password=$KEY_PASSWORD
- cp app/build/outputs/apk/release/app-release.apk app-release.apk
artifacts:
when: on_success
paths:
- app-release.apk