forked from FabricMC/fabric-language-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
40 lines (37 loc) · 1.09 KB
/
Jenkinsfile
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
pipeline {
agent any
stages {
stage('Build') {
steps {
sh "rm -rf build/libs/"
sh "chmod +x gradlew"
sh "./gradlew -PincludeSample=false clean build --refresh-dependencies --full-stacktrace"
}
}
stage('Upload to curseforge') {
when {
branch 'master'
}
steps {
sh 'git log --format=format:%B ${GIT_PREVIOUS_SUCCESSFUL_COMMIT}..${GIT_COMMIT} > changelog.txt'
sh './gradlew -PincludeSample=false -Prelease -Pchangelog_file=changelog.txt curseforge308769 --stacktrace'
}
}
stage('Archive artifacts') {
when {
branch 'master'
}
steps {
sh "./gradlew -PincludeSample=false publish"
}
}
stage('increment build') {
when {
branch 'master'
}
steps {
sh "./gradlew -PincludeSample=false buildNumberIncrement"
}
}
}
}