DisplayVersions
What it does
DisplayVersions computes monochange’s planned package and group versions and renders only that summary.
Use it when you want the release-version answer without the rest of the release preview.
Why use it
Use DisplayVersions when you want a dedicated read-only command such as mc versions.
It is the best fit for:
- CI or local scripts that only need the planned version map
- release dashboards or follow-up tooling that want compact JSON
- human-readable summaries without release targets, changed files, or changelog previews
Inputs
format—text,markdown, orjson
Step-level when condition
All CLI steps support an optional when = "..." condition.
If the expression resolves to false at runtime, monochange skips the step and continues with the next step.
when = "{{ inputs.enabled }}"
Step-level always_run flag
All CLI steps support an optional always_run = true flag.
When set, the step executes even if a previous step in the same command has failed. This is useful for cleanup, notification, or dry-run preview steps that must run regardless of earlier outcomes.
always_run = true
Prerequisites
None. DisplayVersions is standalone.
Side effects and outputs
DisplayVersions is read-only.
It:
- computes the same planned package and group versions used by monochange release workflows
- renders a compact summary in
text,markdown, orjson - does not update manifests, changelogs, or consumed changesets
- does not require a previous
PrepareReleasestep
Example
[cli.versions]
help_text = "Display planned package and group versions"
[[cli.versions.inputs]]
name = "format"
type = "choice"
choices = ["text", "markdown", "json"]
default = "text"
[[cli.versions.steps]]
name = "display versions"
type = "DisplayVersions"
Composition ideas
Use it as the built-in summary command
mc versions
mc versions --format markdown
mc versions --format json
Keep release preparation and version display separate
Use DisplayVersions when you only need the version summary. Use PrepareRelease when you also need release file updates, release targets, manifest artifacts, or later release-oriented steps.
Common mistakes
- expecting it to update release files
- treating it as a replacement for
PrepareReleasein publish or release-request workflows - bundling it into long multi-step commands when a dedicated
versionscommand is clearer