-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
48 lines (44 loc) · 1.32 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
image: ghcr.io/hoang-rio/docker-linux-android-sdk:jdk17
variables:
GIT_SUBMODULE_STRATEGY: normal
stages:
- build
before_script:
- chmod +x ./gradlew
build_apk:
stage: build
interruptible: true
except:
- release
- tags
script:
- gpg2 -v --import <(echo "$GPG_PRIVATE_KEY")
- GPG=gpg2 blackbox_postdeploy
- ./gradlew assembleFreeRelease
- cp app/build/outputs/apk/free/release/app-free-release.apk $CI_PROJECT_DIR/$CI_COMMIT_SHA-free.apk
- ./gradlew assembleProRelease
- cp app/build/outputs/apk/pro/release/app-pro-release.apk $CI_PROJECT_DIR/$CI_COMMIT_SHA-pro.apk
- ls -alh $CI_PROJECT_DIR
artifacts:
paths:
- ./$CI_COMMIT_SHA-free.apk
- ./$CI_COMMIT_SHA-pro.apk
expire_in: 5 day
build_aar:
stage: build
interruptible: true
only:
- tags
script:
- gpg2 -v --import <(echo "$GPG_PRIVATE_KEY")
- GPG=gpg2 blackbox_postdeploy
- ./gradlew :app:bundleFreeRelease
- cp app/build/outputs/bundle/freeRelease/app-free-release.aab $CI_PROJECT_DIR/$CI_COMMIT_SHA-free.aab
- ./gradlew :app:bundleProRelease
- cp app/build/outputs/bundle/proRelease/app-pro-release.aab $CI_PROJECT_DIR/$CI_COMMIT_SHA-pro.aab
- ls -alh $CI_PROJECT_DIR
artifacts:
paths:
- ./$CI_COMMIT_SHA-free.aab
- ./$CI_COMMIT_SHA-pro.aab
expire_in: 5 day