This tool extends Cargo to allow you to publish a workspace, a rust mono repo.
Ensure that you have a fairly recent version of rust/cargo installed. On Ubuntu you would also need to install libssl-dev
and pkg-config
packages.
console,ignore
$ cargo install cargo-publish-workspace
```console
$ cargo publish-workspace --help
Usage: cargo publish-workspace [OPTIONS] --crate-prefix
Arguments: [cargo-publish-args]... Additional arguments to pass to 'cargo publish'
Options:
-p, --crate-prefix
Publish
console
$ cd my-mono-repo
$ cargo publish-workspace --target-version 1.0.0 --token CRATES_IO_TOKEN --crate-prefix PREFIX
Dry run and show order of crates to be published
console
$ cd my-mono-repo
$ cargo publish-workspace --crate-prefix PREFIX --show-order
console
Finished show dependencies order
0. mat-clockwork-utils
1. mat-clockwork-cron
2. mat-clockwork-thread-program-v1
3. mat-clockwork-network-program
This tool has been made to work with a CI such as GitHub Action.
Make sure to setup the GitHub secrets variable for CRATES_IO_TOKEN
with the appropriate value.
- Version will be inferred from the $CITAG environment variable
- Token will be inferred from the $CRATESIO_TOKEN environment variable
console
cargo publish-workspace --crate-prefix PREFIX
Apache-2.0/MIT