Skip to main content
zerv ships a reusable workflow, shared-zerv-versioning.yml, that installs zerv, generates ZERV RON for the current commit, and emits every format you configure as job outputs.

Basic usage

Call it from any workflow in your repository:
versions is a JSON object mapping each output name to its rendered version string:

Inputs

Keys must be unique across the three output inputs: the workflow fails on duplicates. Under the hood the workflow pins the version to the event metadata (pull request head SHA and branch name via --bumped-branch / --bumped-commit-hash) rather than whatever the runner checked out, so PR builds are versioned even before merge. It uses actions/checkout with fetch-depth: 0 and installs zerv via uv tool install zerv-version followed by uv tool upgrade --all, so a cached install still picks up the latest release.

Three ways to shape an output

The three output inputs (output_formats, output_templates, custom_outputs) each map an output name to one shaping mechanism: 1. output_formats: a named output format:
2. output_templates: a Tera template per output:
3. custom_outputs: full zerv command arguments, for anything that needs more than one flag (e.g. a custom schema):
The rendered results, reproducible locally by piping ZERV RON:
One payload feeds all of them. Every artifact in a CI run carries a version derived from the same resolved state, so a docker image and its deploy manifest can never disagree, and the build context (branch.distance.g<hash>) traces any artifact back to the exact commit. The fan-out pattern works the same way locally.

Pin the version

Reference the workflow by a release tag rather than main so CI updates are deliberate:
zerv’s own repository runs this workflow in its CD pipeline; see cd.yml for a live example.

Where to go next