Skip to content

Commit

Permalink
CI: Add tox publish environment
Browse files Browse the repository at this point in the history
Issue: RELENG-4563
Signed-off-by: Andrew Grimberg <[email protected]>
Change-Id: I5a7158668f3418dbba2d09d71c0d32adbc17ddfe
  • Loading branch information
tykeal committed Apr 12, 2023
1 parent c625f9f commit c93773e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c93773e

Please sign in to comment.