Use twine environment variables if set (#3353)

This commit is contained in:
Eric Brown 2024-05-21 14:43:49 -07:00 committed by GitHub
parent ff985aee22
commit d50be7eab1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -616,15 +616,17 @@ def publish(
help="The API token to use for authentication on python package repository. If token is provided, no username/password should be provided at the same time",
),
username: Optional[str] = typer.Option(
None,
os.getenv("TWINE_USERNAME"),
"-u",
"--username",
show_default="TWINE_USERNAME environment variable value if set",
help="The username to use for authentication on python package repository. Username and password must both be provided.",
),
password: Optional[str] = typer.Option(
None,
os.getenv("TWINE_PASSWORD"),
"-p",
"--password",
show_default="TWINE_PASSWORD environment variable value if set",
help="The password to use for authentication on python package repository. Username and password must both be provided.",
),
build: bool = typer.Option(