Publish to pypi if it has a release tag

This commit is contained in:
Harrison Deng 2025-01-17 15:13:47 +00:00
parent 611b956d88
commit ab44dfaa48

6
Jenkinsfile vendored
View File

@ -39,15 +39,15 @@ pipeline {
sh returnStatus: true, script: 'python -m twine upload --repository-url https://git.reslate.systems/api/packages/ydeng/pypi -u __token__ -p ${TOKEN} --non-interactive --disable-progress-bar --verbose dist/*' sh returnStatus: true, script: 'python -m twine upload --repository-url https://git.reslate.systems/api/packages/ydeng/pypi -u __token__ -p ${TOKEN} --non-interactive --disable-progress-bar --verbose dist/*'
} }
} }
stage ("test.pypi.org") { stage ("pypi.org") {
when { when {
tag '*.*' tag '*.*'
} }
environment { environment {
TOKEN = credentials('test.pypi.org') TOKEN = credentials('pypi.org')
} }
steps { steps {
sh returnStatus: true, script: 'python -m twine upload -r testpypi -u __token__ -p ${TOKEN} --non-interactive --disable-progress-bar --verbose dist/*' sh returnStatus: true, script: 'python -m twine upload -u __token__ -p ${TOKEN} --non-interactive --disable-progress-bar --verbose dist/*'
} }
} }
} }