updated Jenkinsfile
nclazz/api-cli/pipeline/head This commit looks good Details

master
Niclas Thobaben 2021-07-07 16:49:19 +02:00
parent 8d954ceff6
commit bd19672be6
1 changed files with 6 additions and 1 deletions

7
Jenkinsfile vendored
View File

@ -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'