Auto-Publish
SorceryCraft/pipeline/head This commit looks good Details

This commit is contained in:
TheBrokenRail 2020-12-15 14:04:06 -05:00
parent 263466eed3
commit 5381263113
1 changed files with 13 additions and 1 deletions

14
Jenkinsfile vendored
View File

@ -7,7 +7,7 @@ pipeline {
stages {
stage('Build') {
steps {
sh './gradlew build javadoc publish'
sh './gradlew build javadoc'
}
post {
success {
@ -24,5 +24,17 @@ pipeline {
}
}
}
stage('Publish') {
when {
expression {
return sh(returnStdout: true, script: 'git tag --contains').trim().length() > 0
}
}
steps {
withCredentials([string(credentialsId: 'curseforge_key', variable: 'CURSEFORGE_KEY')]) {
sh './gradlew -Pcurseforge.api_key="${CURSEFORGE_KEY}" curseforge publish'
}
}
}
}
}