From 804e0af63cb2af3064d6345bcaa087e9e6150dfc Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Thu, 7 Apr 2022 01:55:59 -0500 Subject: [PATCH] Only publish if its the master branch --- Jenkinsfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index b4a077e..51b20c6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,6 +8,16 @@ pipeline { } } } + stage("publish") { + when { + branch "master" + } + steps { + withGradle { + sh "./gradlew publish --no-daemon" + } + } + } } post { always {