pub struct ReleaseConfig {Show 23 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>,
}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 (matches GoReleaser behaviour), 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.
GoReleaser Pro feature.
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 (GoReleaser uses string type).
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).
GoReleaser supports template strings here since v1.15.0.
Accepts the legacy disable: spelling via serde alias for back-compat
with imported GoReleaser configs (GR’s release config field is
pkg/config/config.go:909 Disable string).
mode: Option<String>Release mode: “keep-existing”, “append”, “prepend”, or “replace”.
ids: Option<Vec<String>>Artifact IDs filter for 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).
This is a GoReleaser Pro 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.
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. Mirrors GoReleaser
internal/pipe/release/release.go (cfg.NameTemplate = "{{.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. Mirrors GoReleaser default
(internal/pipe/release/release.go: 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).
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