Skip to main content

ReleaseConfig

Struct ReleaseConfig 

Source
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).

§footer: Option<ContentSource>

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

Source

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.

Source

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).

Source

pub const VALID_MODES: &[&'static str]

Valid mode: values. Anything else is a config error.

Source

pub fn resolved_name_template(&self) -> &str

Resolve the name_template, falling back to Self::DEFAULT_NAME_TEMPLATE.

Source

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.

Source

pub fn resolved_draft(&self) -> bool

Resolve draft, falling back to false.

Source

pub fn resolved_replace_existing_draft(&self) -> bool

Resolve replace_existing_draft, falling back to false.

Source

pub fn resolved_replace_existing_artifacts(&self) -> bool

Resolve replace_existing_artifacts, falling back to false.

Source

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).

Source

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

Source§

fn clone(&self) -> ReleaseConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ReleaseConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ReleaseConfig

Source§

fn default() -> ReleaseConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ReleaseConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for ReleaseConfig

Source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
Source§

impl Serialize for ReleaseConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,