1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-05 04:26:01 +02:00
tldr/pages/common/cargo-publish.md
Lena 02c7e38f8b
cargo-*: add page; cargo-logout: update page (#11337)
Co-authored-by: Juri Dispan <juri.dispan@posteo.net>
2023-10-31 08:29:03 +01:00

17 lines
607 B
Markdown

# cargo publish
> Upload a package to a registry.
> Note: you have to add an authentication token using `cargo login` before publishing a package.
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-publish.html>.
- Perform checks, create a `.crate` file and upload it to the registry:
`cargo publish`
- Perform checks, create a `.crate` file but don't upload it (equivalent of `cargo package`):
`cargo publish --dry-run`
- Specify the name of the registry to use (registry names can be defined in the config - the default is <https://crates.io>):
`cargo publish --registry {{name}}`