How to Release Non-JS Monorepos: Cargo, Go, and Maven
The monorepo release idea (bump, tag, publish only what changed) applies beyond npm: Cargo, Go modules, and Maven each have workspace-aware release tooling.
Rust workspaces publish crates with cargo publish per member, often via cargo-release. Go multi-module repos version each module with its own module/vX.Y.Z tag. Maven multi-module builds bump with the versions plugin and deploy the reactor.
Rust (Cargo workspace)
Terminal
# cargo-release bumps + tags + publishes workspace crates in order
cargo release --workspace --execute minor
# Or publish a single member crate
cargo publish -p acme-coreGo (multi-module)
Terminal
# Each module is versioned by its own path-prefixed tag
git tag core/v1.4.0
git tag api/v0.9.1
git push --tags
# Consumers: go get example.com/repo/core@v1.4.0Maven (multi-module)
Terminal
# Set the version across the reactor, then deploy all modules
mvn versions:set -DnewVersion=2.4.0 -DprocessAllModules=true
mvn -B deployGotchas
- Cargo publishes crates in dependency order and will not publish a crate whose dependency version is not yet on crates.io.
- Go module tags must be path-prefixed (
module/vX.Y.Z) orgo getcannot resolve the submodule version.
Related guides
How to Publish Monorepo Packages in Topological OrderPublish packages in dependency-first (topological) order so a dependent never lands on the registry before th…
How to Create Per-Package Git Tags in a MonorepoTag each released package independently with a name@version tag so history and GitHub releases map to the rig…