version_bump/plugins/github

The GitHub publish plugin.

Mirrors @semantic-release/github’s core responsibility: authenticate with a GitHub token, resolve the target repository, and create a GitHub Release for the version semantic-release just determined.

Hooks implemented:

Effectful work (HTTP, environment access) is kept in the hook bodies; the pure decision logic lives in helpers (resolve_token, is_prerelease, verify) so it can be unit-tested without a network or live environment.

Values

pub fn is_prerelease(next_release: release.NextRelease) -> Bool

Whether the upcoming release is a prerelease (i.e. its channel-tied version carries a prerelease identifier such as -beta.1).

pub fn plugin() -> plugin.Plugin

The plugin record, wiring up the GitHub hooks.

pub fn verify(
  token: option.Option(String),
  config: config.Config,
) -> Result(Nil, error.ReleaseError)

PURE verification: given a resolved token (if any) and the config, decide whether the GitHub plugin can run. Separated out so it can be tested without touching the process environment.

Search Document