From 5c6c772def5ae15fb735f2ccd8e89e0dcd9311c6 Mon Sep 17 00:00:00 2001 From: Niclas Thobaben Date: Wed, 7 Jul 2021 16:02:58 +0200 Subject: [PATCH] updated Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d892ec7..d35e87f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,15 +17,15 @@ pipeline { } } stage('Set Version') { + when { branch 'master' } steps { - when { branch 'master' } sh 'npm version patch' sh 'git push' } } stage('Deploy') { + when { tag 'v*' } steps { - when { tag 'v*' } sh 'npx npm-cli-login -u $NPM_CREDENTIALS_USR -p $NPM_CREDENTIALS_PSW -e $NPM_MAIL -r $NPM_REGISTRY' sh 'npm publish' sh 'npm logout --registry=$NPM_REGISTRY'