Skip to content

Configuration

Versionary reads configuration from versionary.jsonc (preferred) or versionary.json at the repository root. These are the only supported filenames. The schema is strict—unknown keys are rejected.

Editor support

Add a $schema reference for autocomplete and validation:

jsonc
{
  "$schema": "https://raw.githubusercontent.com/jolars/versionary/main/schemas/config.json",
  "version": 1,
  "release-type": "node"
}

The published schema is generated from Versionary's internal Zod schema, which is the single source of truth for the config shape.

Top-level keys

KeyTypeDefaultDescription
version1— (required)Config-format version. Must be 1.
$schemastringJSON Schema URL for editor support.
release-typestring | string[]"simple"The strategy (or array of strategies) used to read/write versions.
review-mode"direct" | "pr" | "review""pr"Release style. pr opens a release PR; direct skips it. review is a legacy alias for pr. See workflows.
version-filestringstrategy-specificPath to the primary version source. Default depends on release-type (see table below).
changelog-filestringCHANGELOG.md / NEWS.mdPath to the changelog. Defaults to NEWS.md for the R strategy, CHANGELOG.md otherwise.
changelog-format"markdown-changelog" | "r-news"strategy-specificChangelog format. Defaults to r-news for the R strategy, markdown-changelog otherwise.
release-branchstring"versionary/release"Branch used for the release PR/commit.
baseline-filestring".versionary-manifest.json"File tracking the baseline SHA for deterministic commit ranges.
bootstrap-shastringFirst-run baseline commit when adopting Versionary on existing history.
next-release-filestringPath to a file whose contents are injected as highlights atop the next release's notes.
release-draftbooleanfalsePublish GitHub Releases as drafts.
release-reference-comments"off" | "best-effort" | "strict""off"Whether to comment on linked issues/PRs when released. See below.
monorepo-mode"independent" | "fixed"Enables monorepo planning.
packagesobjectPer-package configuration (see packages).
allow-stable-majorbooleanfalseAllow a breaking change on 0.y.z to bump to 1.0.0. See pre-1.0 policy.
exclude-pathsstring[]Glob/path prefixes whose changes don't, on their own, count toward a bump. Applies repo-wide and to every package.
bump-minor-pre-majorbooleanAccepted by the schema; not yet wired into release logic. Use allow-stable-major for pre-1.0 control.
include-commit-authorsbooleanAccepted by the schema; not yet wired into changelog rendering.

release-reference-comments

Controls comments posted on issues/PRs referenced by released commits:

  • off (default) — don't post comments.
  • best-effort — post comments, but continue if the API call fails (e.g. missing permissions).
  • strict — fail the release if a comment can't be posted.

Comments require issues: write permission and are authored by the account that owns the configured token. The comment body itself is signed by Versionary.

Default version files by strategy

release-typeDefault version-file
simpleversion.txt
nodepackage.json
rustCargo.toml
rDESCRIPTION
pythonpyproject.toml
juliaProject.toml
latexbuild.lua

See Strategies for the full behavior of each.

packages

A map keyed by package path ("." for the repository root). Used with monorepo-mode. Each entry inherits the top-level config and may override:

KeyTypeDescription
release-typestring | string[]Strategy for this package, overriding the top-level value.
package-namestringOverride the release/tag name (otherwise derived from the version file or path).
changelog-filestringPackage-specific changelog path (written under the package directory).
changelog-format"markdown-changelog" | "r-news"Package-specific changelog format.
allow-stable-majorbooleanOverride the pre-1.0 policy for this package's own bump.
exclude-pathsstring[]Paths (relative to the package) to exclude; unioned with the top-level list.
followsstring[]Source packages this package follows; see follows.
extra-filesartifact-rule[]Additional files to update with the new version (see below).

See the monorepos guide for tag naming, follows, and filtering semantics.

extra-files

extra-files (per package) updates additional files to the new version. Each rule is an artifact rule:

FieldTypeApplies toDescription
typeenumallOne of json, toml, yaml, nix, regex.
pathstringallPath to the file to update.
field-pathstringjson/toml/yaml/nixJSONPath-style locator of the version field (e.g. $.version). Required for these types.
jsonpathstring(deprecated)Deprecated alias for field-path. Don't combine with field-path.
patternstringregexRegex with a capturing group (or a named (?<version>…) group) around the version. Required for regex.

Validation rules enforced by the schema:

  • json/toml/yaml/nix rules require field-path (or the deprecated jsonpath) and must not use pattern.
  • regex rules require pattern and must not use field-path/jsonpath.
  • You can't set both field-path and jsonpath.

Example — keep the action's pinned version in sync, plus a TOML manifest:

jsonc
{
  "version": 1,
  "release-type": "node",
  "packages": {
    ".": {
      "extra-files": [
        {
          "type": "yaml",
          "path": "action.yml",
          "field-path": "$.inputs.versionary-version.default"
        },
        {
          "type": "regex",
          "path": "README.md",
          "pattern": "versionary@(?<version>\\d+\\.\\d+\\.\\d+)"
        }
      ]
    }
  }
}

Validation errors

packages with follows are validated at load time. The following are configuration errors:

  • a package following itself
  • following an unknown package path
  • follows cycles (reported with the offending chain)
  • combining follows with monorepo-mode: "fixed"

Run versionary verify to check your config and version files before relying on them in CI.

Released under the MIT License.