ModUpdater/Jenkinsfile

33 lines
876 B
Plaintext
Raw Permalink Normal View History

2020-06-24 02:21:54 +00:00
pipeline {
agent {
docker {
image 'openjdk:8-jdk'
}
}
stages {
stage('Build') {
steps {
2020-08-11 20:46:15 +00:00
sh './gradlew build'
2020-06-24 02:21:54 +00:00
}
post {
success {
archiveArtifacts artifacts: 'build/libs/*', fingerprint: true
}
}
}
2020-08-11 20:46:15 +00:00
stage('Publish') {
when {
expression {
return sh(returnStdout: true, script: 'git tag --contains').trim().length() > 0
}
}
steps {
sh './gradlew publish'
withCredentials([string(credentialsId: 'curseforge_key', variable: 'CURSEFORGE_KEY')]) {
sh './gradlew -Pcurseforge.api_key="${CURSEFORGE_KEY}" curseforge'
}
}
}
2020-06-24 02:21:54 +00:00
}
}