ci: publish @xuqm-private/vue3-sdk alongside main package
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
这个提交包含在:
父节点
cd28487dad
当前提交
0bfcb4502f
20
Jenkinsfile
vendored
20
Jenkinsfile
vendored
@ -79,6 +79,26 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Publish Private SDK to Nexus') {
|
||||
steps {
|
||||
withCredentials([usernamePassword(credentialsId: 'NEXUS_CREDS', passwordVariable: 'NPM_PASS', usernameVariable: 'NPM_USER')]) {
|
||||
bat """
|
||||
powershell -NonInteractive -Command "Set-Content .npmrc ('//nexus.xuqinmin.com/repository/npm-hosted/:_auth=' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(\$env:NPM_USER + ':' + \$env:NPM_PASS))) -Encoding ASCII"
|
||||
npm publish --userconfig .npmrc --registry %NEXUS_REGISTRY% --pack-destination dist-private-tmp || exit 0
|
||||
node -e "const fs=require('fs'); const p=JSON.parse(fs.readFileSync('package.private.json')); fs.writeFileSync('package.json.bak', fs.readFileSync('package.json')); fs.writeFileSync('package.json', JSON.stringify(p,null,2));"
|
||||
npm publish --registry %NEXUS_REGISTRY%
|
||||
move /Y package.json.bak package.json
|
||||
"""
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
bat 'del .npmrc 2>nul || exit 0'
|
||||
bat 'if exist package.json.bak move /Y package.json.bak package.json'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
|
||||
正在加载...
在新工单中引用
屏蔽一个用户