pub enum PublishConfig {
Cargo {
features: Vec<String>,
registry: Option<String>,
workspace: bool,
},
Npm {
registry: Option<String>,
access: Option<String>,
workspace: bool,
},
Docker {
image: String,
platforms: Vec<String>,
dockerfile: Option<String>,
},
Pypi {
repository: Option<String>,
workspace: bool,
dist_dir: Option<String>,
},
Go,
Custom {
command: String,
check: Option<String>,
cwd: Option<String>,
},
}Expand description
Per-package publish configuration. Typed enum — the user picks a
known publisher (cargo, npm, docker, pypi, go) and sr handles
both the “is it already published?” check (registry API call) and the
actual publish command (shelled out). The custom variant is the escape
hatch for arbitrary shell commands + a user-supplied state check.
Deserializes as an internally-tagged enum: { type: <publisher>, ... }.
Variants§
Cargo
cargo publish to crates.io (or a custom registry).
Fields
Npm
npm publish to registry.npmjs.org (or a custom registry).
Auto-detects pnpm / yarn / npm from lockfiles at path.
Fields
Docker
Push a container image to a registry using docker buildx build --push.
Fields
Pypi
Publish to PyPI via twine upload or uv publish (auto-detected).
Artifacts are resolved per-member from <package_path>/<dist_dir> by
filename prefix (PEP 625 stem + version) — matching uv build --all’s
workspace-root dist layout rather than assuming per-member dist dirs.
Fields
Go
Go modules publish by git-tag; sr already cuts the tag, so this is effectively a noop documenting the package’s presence in the manifest.
Custom
Arbitrary publish command with a user-supplied state check. The only place sr shells out for a user-provided command; limited to registries that don’t have a built-in publisher.
Trait Implementations§
Source§impl Clone for PublishConfig
impl Clone for PublishConfig
Source§fn clone(&self) -> PublishConfig
fn clone(&self) -> PublishConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more