pub struct ReleaseConfig {Show 27 fields
pub github: Option<ScmRepoConfig>,
pub gitlab: Option<ScmRepoConfig>,
pub gitea: Option<ScmRepoConfig>,
pub draft: Option<bool>,
pub prerelease: Option<PrereleaseConfig>,
pub make_latest: Option<MakeLatestConfig>,
pub name_template: Option<String>,
pub header: Option<ContentSource>,
pub footer: Option<ContentSource>,
pub extra_files: Option<Vec<ExtraFileSpec>>,
pub templated_extra_files: Option<Vec<TemplatedExtraFile>>,
pub skip_upload: Option<StringOrBool>,
pub replace_existing_draft: Option<bool>,
pub replace_existing_artifacts: Option<bool>,
pub skip: Option<StringOrBool>,
pub mode: Option<String>,
pub ids: Option<Vec<String>>,
pub target_commitish: Option<String>,
pub discussion_category_name: Option<String>,
pub include_meta: Option<bool>,
pub use_existing_draft: Option<bool>,
pub tag: Option<String>,
pub upload_concurrency: Option<u32>,
pub required: Option<bool>,
pub provider: Option<ForceTokenKind>,
pub retain_on_rollback: Option<bool>,
pub on_failure: Option<OnFailureConfig>,
}Fields§
§github: Option<ScmRepoConfig>GitHub repository to release to (owner and name).
gitlab: Option<ScmRepoConfig>GitLab repository to release to (owner and name).
gitea: Option<ScmRepoConfig>Gitea repository to release to (owner and name).
draft: Option<bool>When true, create the release as a draft (unpublished).
prerelease: Option<PrereleaseConfig>Mark release as pre-release: true, false, or “auto” (inferred from tag).
make_latest: Option<MakeLatestConfig>Mark release as latest: true, false, or “auto” (latest non-prerelease).
name_template: Option<String>Release title template (supports templates).
header: Option<ContentSource>Text prepended to the release body (inline string, from_file, or from_url).
Text appended to the release body (inline string, from_file, or from_url).
extra_files: Option<Vec<ExtraFileSpec>>Extra files to upload to the release beyond build artifacts.
Paths / globs are resolved relative to the project root. ..
segments are accepted, so an entry
like ../sibling/dist/* will reach outside the project tree —
security-conscious users should keep the entries inside the repo or
canonicalise them before invoking the release pipeline.
templated_extra_files: Option<Vec<TemplatedExtraFile>>Extra files whose contents are rendered through the template engine before upload.
Unlike extra_files which copy as-is, template variables like {{ Tag }} are expanded.
Same path-traversal caveat as extra_files: .. segments reach
outside the project tree.
skip_upload: Option<StringOrBool>Skip uploading artifacts: true, false, or “auto” (skip for snapshots). Accepts bool or template string.
replace_existing_draft: Option<bool>When true, replace an existing draft release instead of failing.
replace_existing_artifacts: Option<bool>When true, replace existing release artifacts with the same name.
skip: Option<StringOrBool>Skip the release stage. Accepts bool or template string
(e.g. "{{ if IsSnapshot }}true{{ endif }}" for conditional skip).
Template strings are supported here.
Accepts the legacy disable: spelling via serde alias for back-compat
with imported configs (the legacy disable: spelling).
mode: Option<String>Release mode: “keep-existing”, “append”, “prepend”, or “replace”.
ids: Option<Vec<String>>Artifact IDs filter for uploads. Release-wide artifacts (checksums, source archive, extra files, metadata) always upload regardless of the filter, and derived artifacts (signatures, certificates, SBOMs) inherit the verdict of the artifact they derive from — a signature uploads iff the artifact it signs uploads.
target_commitish: Option<String>Target branch or SHA for the release tag.
discussion_category_name: Option<String>GitHub Discussion category name for the release.
include_meta: Option<bool>Upload metadata.json and artifacts.json as release assets.
use_existing_draft: Option<bool>Reuse an existing draft release instead of creating a new one.
tag: Option<String>Override the release tag (template string). When set, this tag is used
as the tag_name in the GitHub release API instead of the crate’s
tag_template. Useful in monorepo setups to strip a tag prefix
(e.g. "{{ Tag }}" to publish v1.0.0 instead of myapp/v1.0.0).
A cross-platform publishing feature provided for free by anodizer.
upload_concurrency: Option<u32>Maximum number of asset-upload requests in flight simultaneously.
GitHub’s secondary rate-limit is triggered by burst traffic. Keeping
this value low avoids tripping the limit even for releases with many
artifacts. Default: 4. Override at runtime with
ANODIZER_GITHUB_UPLOAD_CONCURRENCY.
required: Option<bool>Override whether this publisher failing should fail the overall release.
Default: true — a failure here aborts the release.
Set to false to log failures but continue.
provider: Option<ForceTokenKind>Explicit publish target — the SCM provider whose release.<provider>
block the publisher uses. When set, overrides the implicit
token-type fallback chain in
crate::scm::resolve_token_type.
Use this for cross-platform publishing
pattern: source repo on one provider (e.g. GitLab) but releases
land on another (e.g. GitHub). Without it, the publish target
is inferred from which *_TOKEN env-var is set — fine for
single-provider setups but ambiguous when both tokens are
available.
release:
provider: github
github:
owner: my-org
name: my-appretain_on_rollback: Option<bool>When true, a triggered rollback leaves this publisher’s work in
place rather than attempting to undo it. Default false.
on_failure: Option<OnFailureConfig>In-process failure policy: what anodizer release does after a
release-pipeline failure. rollback (default) deletes the run’s
release tag(s) and reverts the version-bump commit so the same
version can be re-cut; hold leaves everything in place for
forensics and manual recovery (release --rollback-only --from-run=<id>). rollback automatically degrades to hold
the moment any one-way-door (Submitter) publisher has landed:
the version is burned at a registry that never accepts it twice,
so destructive rollback is refused and fix-forward is the only
path. Root-level policy — in workspace configs (lockstep or
per-crate) the top-level release.on_failure governs the whole
run; setting it in a crate-level release: block is rejected at
config load (validate_on_failure_root_only).
Implementations§
Source§impl ReleaseConfig
impl ReleaseConfig
Sourcepub const DEFAULT_NAME_TEMPLATE: &'static str = "{{ Tag }}"
pub const DEFAULT_NAME_TEMPLATE: &'static str = "{{ Tag }}"
Default release-name template ("{{Tag}}").
Anodize uses Tera-style {{ Tag }} (no dot prefix); the rendered
value is identical for any tag the project produces.
Sourcepub const DEFAULT_MODE: &'static str = "keep-existing"
pub const DEFAULT_MODE: &'static str = "keep-existing"
Default release mode (empty string is treated as
“keep-existing” — keep current release notes, don’t overwrite).
Sourcepub const VALID_MODES: &[&'static str]
pub const VALID_MODES: &[&'static str]
Valid mode: values. Anything else is a config error.
Sourcepub fn resolved_name_template(&self) -> &str
pub fn resolved_name_template(&self) -> &str
Resolve the name_template, falling back to
Self::DEFAULT_NAME_TEMPLATE.
Sourcepub fn resolved_mode(&self) -> Result<&str>
pub fn resolved_mode(&self) -> Result<&str>
Resolve the release mode, validating and falling back to
Self::DEFAULT_MODE when unset or empty. Returns an error when
the user supplied a value outside Self::VALID_MODES so the
invalid mode surfaces at the call site instead of producing a
silent no-op publish.
Sourcepub fn resolved_draft(&self) -> bool
pub fn resolved_draft(&self) -> bool
Resolve draft, falling back to false.
Sourcepub fn resolved_replace_existing_draft(&self) -> bool
pub fn resolved_replace_existing_draft(&self) -> bool
Resolve replace_existing_draft, falling back to false.
Sourcepub fn resolved_replace_existing_artifacts(&self) -> bool
pub fn resolved_replace_existing_artifacts(&self) -> bool
Resolve replace_existing_artifacts, falling back to false.
Sourcepub fn resolved_include_meta(&self) -> bool
pub fn resolved_include_meta(&self) -> bool
Resolve include_meta, falling back to false (don’t upload
metadata.json / artifacts.json as release assets by default).
Sourcepub fn resolved_use_existing_draft(&self) -> bool
pub fn resolved_use_existing_draft(&self) -> bool
Resolve use_existing_draft, falling back to false (always
create a fresh draft when one isn’t found by default).
Sourcepub fn resolved_on_failure(&self) -> OnFailureConfig
pub fn resolved_on_failure(&self) -> OnFailureConfig
Resolve on_failure, falling back to
OnFailureConfig::Rollback.
Trait Implementations§
Source§impl Clone for ReleaseConfig
impl Clone for ReleaseConfig
Source§fn clone(&self) -> ReleaseConfig
fn clone(&self) -> ReleaseConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReleaseConfig
impl Debug for ReleaseConfig
Source§impl Default for ReleaseConfig
impl Default for ReleaseConfig
Source§fn default() -> ReleaseConfig
fn default() -> ReleaseConfig
Source§impl<'de> Deserialize<'de> for ReleaseConfigwhere
ReleaseConfig: Default,
impl<'de> Deserialize<'de> for ReleaseConfigwhere
ReleaseConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ReleaseConfig
impl JsonSchema for ReleaseConfig
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more