From 0a2afee6ee5a20b5a00bf77c71a3c5193e59a385 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Tue, 11 Aug 2020 16:46:15 -0400 Subject: [PATCH] 1.16.2 --- Jenkinsfile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1b7f5b2..bc9c1f9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,7 +7,7 @@ pipeline { stages { stage('Build') { steps { - sh './gradlew build publish' + sh './gradlew build' } post { success { @@ -15,5 +15,18 @@ pipeline { } } } + 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' + } + } + } } }