feat: add .gitlab-ci.yml

This commit is contained in:
Georg K
2022-03-30 18:48:10 +03:00
parent 27c0d76e16
commit 4e8fb95c52
2 changed files with 15 additions and 3 deletions

View File

@@ -156,7 +156,7 @@ def prepare_upload(c):
@task(tag_eq_version, prepare_upload)
def upload(c, pypi_user=None, pypi_password=None):
def upload(c, pypi_user=None, pypi_password=None, pypi_url=None):
"""
Upload on pypi
"""
@@ -165,8 +165,9 @@ def upload(c, pypi_user=None, pypi_password=None):
if pypi_user is not None and pypi_password is not None:
c.run(
f"dist_venv/bin/twine upload --non-interactive"
f" -u {pypi_user} -p {pypi_password} {dist}",
f" -u {pypi_user} -p {pypi_password} {dist}"
f" --repository-url {pypi_url}",
hide=True,
)
else:
c.run(f"dist_venv/bin/twine upload --repository aiohttp-pydantic {dist}")
c.run(f"dist_venv/bin/twine upload --repository-url {pypi_url} --repository aiohttp-pydantic {dist}")