From c93773ee50a0f9d70273af0c8066f51e7141042c Mon Sep 17 00:00:00 2001 From: Andrew Grimberg Date: Wed, 12 Apr 2023 09:59:57 -0700 Subject: [PATCH] CI: Add tox publish environment Issue: RELENG-4563 Signed-off-by: Andrew Grimberg Change-Id: I5a7158668f3418dbba2d09d71c0d32adbc17ddfe --- tox.ini | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tox.ini b/tox.ini index 79859352..47dc9be2 100644 --- a/tox.ini +++ b/tox.ini @@ -99,6 +99,26 @@ commands = git config --global --unset user.email; \ rm -f .git/REMOVE_USEREMAIL; fi" + +[testenv:publish] +description = + Publish the package you have been developing to a package index server. + By default, it uses testpypi. If you really want to publish your package + to be publicly accessible in PyPI, use the `-- --repository pypi` option. +skip_install = True +changedir = {toxinidir} +passenv = + # See: https://twine.readthedocs.io/en/latest/ + TWINE_USERNAME + TWINE_PASSWORD + TWINE_REPOSITORY + TWINE_REPOSITORY_URL +deps = twine +commands = + python -m twine check dist/* + python -m twine upload {posargs:--repository {env:TWINE_REPOSITORY:testpypi}} dist/* + + [testenv:reno] description = OpenStack Reno checks basepython = python3 -- 2.16.6