version_bump/engine

The release pipeline orchestrator.

run wires the leaf modules (git, branches, commit_parser), the plugin registry, and the hook runners into semantic-release’s lifecycle:

  1. resolve the current branch and build the shared Context
  2. resolve each configured plugin against the registry
  3. verify_conditions
  4. find the last release from the git tags
  5. read & parse the commits since that release
  6. analyze_commits -> a release type (or stop: “no release”)
  7. compute the next version and build the NextRelease
  8. verify_release
  9. generate_notes -> attach to the next release
  10. (dry-run) report and stop
  11. prepare, then create & push the git tag
  12. publish -> collect the produced releases
  13. success

Any error after verify_conditions triggers the plugins’ fail hooks before the error is returned to the caller.

Types

The outcome of a pipeline run.

released is False when nothing was published — either no commits warranted a release, or the run was a dry-run. version/notes carry the computed next release details when one was determined (even in a dry-run, so callers can preview them); releases holds the artifacts published by the publish hooks.

pub type Summary {
  Summary(
    released: Bool,
    version: option.Option(String),
    notes: option.Option(String),
    releases: List(release.Release),
  )
}

Constructors

Values

pub fn run(
  config: config.Config,
  cwd: String,
  env: dict.Dict(String, String),
) -> task.Task(Result(Summary, error.ReleaseError))

Run the full release pipeline for the project rooted at cwd.

Returns a Task because the publish stage is asynchronous: on Erlang the task is synchronous; on JavaScript it is a promise. Callers run it with task.run.

Search Document