Skip to content

Commit

Permalink
fix: Super final ultimate fix for publish duty
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Apr 26, 2024
1 parent 1c49492 commit f888d9f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion project/duties.py.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,12 @@ def publish(ctx: Context) -> None:
"""Publish source and wheel distributions to PyPI."""
from twine.cli import dispatch as twine_upload

if not Path("dist").exists():
ctx.run("false", title="No distribution files found")
dists = [str(dist) for dist in Path("dist").iterdir()]
ctx.run(
twine_upload,
args=[["upload", "-r", "pypi", "--skip-existing", "dist/*"]],
args=[["upload", "-r", "pypi", "--skip-existing", *dists]],
title="Publish source and wheel distributions to PyPI",
command="twine upload -r pypi --skip-existing dist/*",
pty=PTY,
Expand Down

0 comments on commit f888d9f

Please sign in to comment.