-
Notifications
You must be signed in to change notification settings - Fork 41
/
.gitlab-ci.yml
51 lines (45 loc) · 913 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
image: registry.gitlab.com/hardysim/android-ci:latest
cache:
paths:
- .gradle/wrapper
- .gradle/caches
- .android/build-cache/
stages:
- build
- release
before_script:
- export GRADLE_USER_HOME=.gradle
- export ANDROID_SDK_HOME=$CI_PROJECT_DIR
- chmod +x ./gradlew
debug build:
stage: build
tags:
- docker
script:
- ./gradlew assembleDebug
except:
- main
library release build:
stage: build
tags:
- docker
script:
- ./gradlew clean library:assembleRelease androidSourcesJar
artifacts:
paths:
- library/build*
only:
- main
library upload to MavenCentral:
stage: release
tags:
- docker
before_script:
- echo $GPG_KEY_CONTENTS | base64 -d > secret.gpg
script:
- ./gradlew library:publishReleasePublicationToSonatypeRepository closeAndReleaseRepository
dependencies:
- library release build
only:
- main
when: manual