Enable deploy on pypi

This commit is contained in:
Vincent Maillol
2021-07-16 10:52:41 +02:00
parent 17220f2840
commit c9c8c6e205
3 changed files with 29 additions and 13 deletions

View File

@@ -39,7 +39,7 @@ local BuildAndTestPipeline(name, image) = {
}
],
trigger: {
event: ["push", "tag"]
event: ["pull_request", "push", "tag"]
}
};
@@ -55,17 +55,22 @@ local BuildAndTestPipeline(name, image) = {
name: "Deploy on Pypi",
steps: [
{
name: "Deploy on Pypi",
image: "plugins/pypi",
settings: {
username: {
name: "Install twine and deploy",
image: "python3.8",
environment: {
pypi_username: {
from_secret: 'pypi_username'
},
password: {
pypi_password: {
from_secret: 'pypi_password'
}
},
distributions: 'bdist_wheel'
commands: [
"pip install --force-reinstall twine wheel",
"python setup.py build bdist_wheel",
"set +x",
"twine upload --non-interactive -u \"$pypi_username\" -p \"$pypi_password\" dist/*"
]
},
],
trigger: {