Skip to content

Instantly share code, notes, and snippets.

@AlTosterino
Created April 17, 2023 12:02
Show Gist options
  • Save AlTosterino/fc83c7d5b8c649851a6774182cf2560d to your computer and use it in GitHub Desktop.
Save AlTosterino/fc83c7d5b8c649851a6774182cf2560d to your computer and use it in GitHub Desktop.
Publishing Python package using poetry (including test pypi)
# Publish to test.pypi.org
poetry build
poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry config pypi-token.test-pypi pypi-TOKEN # Token from: https://test.pypi.org/manage/account/token/
poetry publish -r test-pypi
# Publish to pypi.org
poetry build
poetry config pypi-token.pypi pypi-XXXXXXXX # Token from: https://pypi.org/manage/account/token/
poetry publish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment