forked from twitch4j/twitch4j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
90 lines (80 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
####
# GitLab CI
####
# Image
image: openjdk:11-jdk-oracle
# Variables
variables:
# Submodule Support (Hugo)
GIT_SUBMODULE_STRATEGY: recursive
# Cache
cache:
key: gradle
paths:
- .gradle/wrapper
- .gradle/caches
# Stages
stages:
- build
- test
- docs
- publishStage
- publishStable
# Build
Assemble:
stage: build
script:
- export GRADLE_USER_HOME=`pwd`/.gradle
- ./gradlew assemble
# Test
Run Tests:
stage: test
script:
- export GRADLE_USER_HOME=`pwd`/.gradle
- ./gradlew test
###
# Test Documentation
###
test:
image: registry.gitlab.com/pages/hugo:0.49.1
stage: test
script:
- cd docs
- hugo
###
# Build & Publish on GitLab Pages
###
pages:
image: registry.gitlab.com/pages/hugo:0.49.1
stage: docs
script:
- cd docs
- hugo --baseUrl https://${CI_PROJECT_NAMESPACE}.gitlab.io/${CI_PROJECT_NAME}/
- cp -R public ../
artifacts:
paths:
- public
only:
- develop
###
# Pre-Release
###
Publish Prerelease:
stage: publishStage
script:
- export GRADLE_USER_HOME=`pwd`/.gradle
- ./gradlew artifactoryPublish -Dsnapshot=true
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+\-alpha\.[0-9]+$/
- /^v[0-9]+\.[0-9]+\.[0-9]+\-beta\.[0-9]+$/
- /^v[0-9]+\.[0-9]+\.[0-9]+\-rc\.[0-9]+$/
###
# Stable Release
###
Publish Release:
stage: publishStable
script:
- export GRADLE_USER_HOME=`pwd`/.gradle
- ./gradlew bintrayUpload
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+$/