Skip to content

Commit e71fde6

Browse files
committed
Add release job to tox
This also changes the build job to clear out existing entries before a new build is invoked.
1 parent d2b72a4 commit e71fde6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tox.ini

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,21 @@ deps =
4848
pep517
4949
twine
5050
commands =
51+
python -c "from pathlib import Path; \
52+
[x.unlink(missing_ok=True) for x in Path('{toxinidir}/dist').glob('*')]"
5153
python -m pep517.build -s -b {toxinidir} -o {toxinidir}/dist
5254
twine check {toxinidir}/dist/*
55+
56+
[testenv:release]
57+
description = Make a release; must be called after "build"
58+
skip_install = True
59+
deps =
60+
twine
61+
depends =
62+
build
63+
passenv =
64+
TWINE_*
65+
commands =
66+
twine check {toxinidir}/dist/*
67+
twine upload {toxinidir}/dist/* \
68+
{posargs:-r testpypi --non-interactive}

0 commit comments

Comments
 (0)