-
Notifications
You must be signed in to change notification settings - Fork 9
/
.gitlab-ci.yml
50 lines (44 loc) · 1.39 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
stages:
- build
- release
before_script:
- export GRADLE_USER_HOME=/cache/.gradle
build:
stage: build
script:
- "cd CockpitCore && ./gradlew build && cd .."
- "cd CockpitPlugin && ./gradlew build && cd .."
- "./gradlew build"
tags:
- android
release_gradle_plugin:
stage: release
script:
- "cd CockpitCore && ./gradlew build && cd .."
- "cd CockpitPlugin && ./gradlew build && cd .."
- "./gradlew build"
- "echo \"\ngradle.publish.key=$GRADLE_PUBLISH_KEY\" >> CockpitPlugin/gradle.properties"
- "echo \"\ngradle.publish.secret=$GRADLE_PUBLISH_SECRET\" >> CockpitPlugin/gradle.properties"
- "cd CockpitPlugin && ./gradlew publishPlugins && cd .."
tags:
- android
only:
- tags
release_sonatype_library:
stage: release
script:
- "cd CockpitCore && ./gradlew build && cd .."
- "cd CockpitPlugin && ./gradlew build && cd .."
- "./gradlew build"
- "echo \"\nSONATYPE_NEXUS_USERNAME=$SONATYPE_NEXUS_USERNAME\" >> gradle.properties"
- "echo \"\nSONATYPE_NEXUS_PASSWORD=$SONATYPE_NEXUS_PASSWORD\" >> gradle.properties"
- "echo \"\nsigning.keyId=$GPG_KEY_ID\" >> gradle.properties"
- "echo \"\nsigning.password=$GPG_PASSPHRASE\" >> gradle.properties"
- "echo \"\nsigning.secretKeyRingFile=$GPG_KEY_RING_FILE\" >> gradle.properties"
- "echo \"$GPG_KEY\" > /tmp/key"
- "gpg --import /tmp/key"
- "./gradlew uploadArchives"
tags:
- android
only:
- tags