sv-tools/Rust Metadata Action

Expose `cargo metadata` as workflow outputs: package list, publishable crates, and a per-package / per-feature job matrix.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
manifest-pathPath to the project's `Cargo.toml`. The action runs from this file's directory, so any adjacent `rust-toolchain.toml` is honored — its pinned toolchain is installed via `rustup` before metadata is read.noCargo.toml
packages-excludeComma-separated list of package names to drop from the `packages` output. Independent of the other `*-exclude*` inputs.no""
publish-excludeComma-separated list of package names to drop from the `publish` output. Useful for crates that are publishable per Cargo.toml but you never want this workflow to publish (e.g. mirrored or vendored copies). Independent of the other `*-exclude*` inputs.no""
matrix-exclude-packagesComma-separated list of package names to drop from the `matrix` output. Excluded packages may still appear in `packages` and `publish`; only matrix rows are suppressed.no""
matrix-exclude-featuresComma-separated list of features to drop from `matrix` rows. Each entry is either `<feature>` (excluded from every package that declares it) or `<package>:<feature>` (scoped to that package). If every feature of a package is excluded, the package contributes no matrix rows at all (no bare `--package=` fallback).no""
namedescription
metadataFull `cargo metadata --no-deps` output as a JSON-encoded string. Use `fromJson` in workflow expressions to parse it.
packagesJSON-encoded array of every package name in the workspace. Example: `["foo","bar"]`.
publishJSON-encoded array of package names that need to be published — i.e. their local `version` is strictly newer than what is on the registry. The action runs `cargo info` for each publishable candidate and compares versions per semver. Packages declared `publish = false` are always excluded; packages not yet on the registry are included (first publish); packages whose registry version is equal or newer are skipped. Packages restricted to a specific registry via `publish = ["my-registry"]` are queried against that registry. Example: `["foo","bar"]`.
matrixJSON-encoded array of cargo argument strings — one entry per package, or one per feature for packages that declare features. Intended for `strategy.matrix`. Example: `["--package=foo","--package=bar --features=full"]`.
rust-versionWorkspace MSRV: the highest `rust-version` declared by any package, compared numerically (so `1.10` > `1.9`). Empty string if no package declares one. Useful for `actions-rust-lang/setup-rust-toolchain`.
editionThe newest Rust edition used by any package in the workspace (e.g. `2021`, `2024`). Empty string for an empty workspace.