diff --git a/Jenkinsfile b/Jenkinsfile index 4d87dc0..deef9a9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,7 +33,12 @@ pipeline { } } stage('Deploy') { - when { tag 'v*' } + when { + allOf { + expression { BRANCH_NAME == 'master' } + expression { env.TAG_NAME != null } + } + } steps { sh 'npx npm-cli-login -u $NPM_CREDENTIALS_USR -p $NPM_CREDENTIALS_PSW -e $NPM_MAIL -r $NPM_REGISTRY' sh 'npm publish'