Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions pages/common/poetry-publish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# poetry publish

> Publish a Poetry package to a remote repository (PyPI by default).
> More information: <https://python-poetry.org/docs/cli/#publish>.

- Publish the package to PyPI (requires authentication):

`poetry publish`

- Publish to a specific repository configured in `pyproject.toml`:

`poetry publish --repository {{repository_name}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`poetry publish --repository {{repository_name}}`
`poetry publish {{[-r|--repository]}} {{repository_name}}`


- Publish and build the package first:

`poetry publish --build`

- Publish with a specific username and password:

`poetry publish --username {{username}} --password {{password}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`poetry publish --username {{username}} --password {{password}}`
`poetry publish {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}}`


- Publish in dry-run mode (show what would be published without actually publishing):

`poetry publish --dry-run`

- Display help:

`poetry publish --help`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`poetry publish --help`
`poetry publish {{[-h|--help]}}`