jenkins-scripts/publish/new/Jenkinsfile

17 lines
475 B
Plaintext
Raw Permalink Normal View History

2020-04-04 11:10:31 +03:00
stage ('publish') {
echo 'checking tag'
script {
def tag = sh(returnStdout: true, script: "git tag --contains").trim()
if (tag) {
echo 'found tag ' + tag
sh "echo '${JEN_FILES_TMP_NAME}' >> .npmignore"
withNPM(npmrcConfig:'npm-cfg') {
2024-03-21 10:11:04 +03:00
echo "Performing npm publish..."
2020-04-04 11:10:31 +03:00
sh 'npm publish --access public'
}
} else {
echo 'tag not found'
}
}
}