pub struct Config {Show 47 fields
pub version: Option<u32>,
pub project_name: String,
pub dist: PathBuf,
pub includes: Option<Vec<IncludeSpec>>,
pub env_files: Option<EnvFilesConfig>,
pub defaults: Option<Defaults>,
pub before: Option<HooksConfig>,
pub after: Option<HooksConfig>,
pub crates: Vec<CrateConfig>,
pub changelog: Option<ChangelogConfig>,
pub signs: Vec<SignConfig>,
pub binary_signs: Vec<SignConfig>,
pub docker_signs: Option<Vec<DockerSignConfig>>,
pub upx: Vec<UpxConfig>,
pub snapshot: Option<SnapshotConfig>,
pub nightly: Option<NightlyConfig>,
pub announce: Option<AnnounceConfig>,
pub report_sizes: Option<bool>,
pub env: Option<Vec<String>>,
pub variables: Option<HashMap<String, String>>,
pub publishers: Option<Vec<PublisherConfig>>,
pub dockerhub: Option<Vec<DockerHubConfig>>,
pub artifactories: Option<Vec<ArtifactoryConfig>>,
pub cloudsmiths: Option<Vec<CloudSmithConfig>>,
pub homebrew_casks: Option<Vec<HomebrewCaskConfig>>,
pub tag: Option<TagConfig>,
pub git: Option<GitConfig>,
pub partial: Option<PartialConfig>,
pub workspaces: Option<Vec<WorkspaceConfig>>,
pub source: Option<SourceConfig>,
pub sboms: Vec<SbomConfig>,
pub release: Option<ReleaseConfig>,
pub github_urls: Option<GitHubUrlsConfig>,
pub gitlab_urls: Option<GitLabUrlsConfig>,
pub gitea_urls: Option<GiteaUrlsConfig>,
pub force_token: Option<ForceTokenKind>,
pub notarize: Option<NotarizeConfig>,
pub metadata: Option<MetadataConfig>,
pub template_files: Option<Vec<TemplateFileConfig>>,
pub monorepo: Option<MonorepoConfig>,
pub makeselfs: Vec<MakeselfConfig>,
pub srpms: Option<SrpmConfig>,
pub milestones: Option<Vec<MilestoneConfig>>,
pub uploads: Option<Vec<UploadConfig>>,
pub aur_sources: Option<Vec<AurSourceConfig>>,
pub retry: Option<RetryConfig>,
pub mcp: McpConfig,
}Expand description
deny_unknown_fields rejects typos and unknown config
fields at parse time, matching GoReleaser’s yaml.UnmarshalStrict.
Fields§
§version: Option<u32>Schema version. Currently supports 1 (implicit default) and 2.
project_name: StringHuman-readable project name used in templates and release titles.
dist: PathBufOutput directory for build artifacts (default: ./dist).
includes: Option<Vec<IncludeSpec>>Additional config files to merge into this config.
Supports plain string paths, from_file: for structured file paths,
and from_url: for fetching configs from URLs with optional headers.
env_files: Option<EnvFilesConfig>Environment file configuration. Accepts either:
- A list of
.envfile paths:[".env", ".release.env"] - A struct with token file paths:
{ github_token: "~/.config/goreleaser/github_token" }
defaults: Option<Defaults>Default values applied to all crates unless overridden.
before: Option<HooksConfig>Hooks run before the release pipeline starts.
after: Option<HooksConfig>Hooks run after the release pipeline completes.
crates: Vec<CrateConfig>List of crates in this project.
changelog: Option<ChangelogConfig>Changelog generation configuration.
signs: Vec<SignConfig>Signing configurations for binaries, archives, and checksums.
binary_signs: Vec<SignConfig>Binary-specific signing configs (same shape as signs but only for
binary artifacts). The artifacts field on each entry is constrained
at parse time to binary / none (or omitted) — a broader filter on
binary_signs would silently match nothing because the loop only
iterates Binary artifacts. Constraint lives in deserialize_binary_signs.
docker_signs: Option<Vec<DockerSignConfig>>Docker image signing configurations.
upx: Vec<UpxConfig>UPX binary compression configurations.
snapshot: Option<SnapshotConfig>Snapshot release configuration (local/non-tag builds).
nightly: Option<NightlyConfig>Nightly release configuration.
announce: Option<AnnounceConfig>Announcement configuration (Slack, Discord, email, etc.).
report_sizes: Option<bool>When true, log artifact file sizes after building.
env: Option<Vec<String>>Environment variables available to all template expressions.
List of KEY=VALUE strings (matches GoReleaser):
env: ["MY_VAR=hello", "DEPLOY_ENV=staging"]. Order is preserved so
chained env applications (sign + sbom + notarize) see entries in
declared order. Values are rendered through the template engine before
being set, so expressions like {{ .Tag }} or {{ .Date }} are
expanded.
variables: Option<HashMap<String, String>>Custom template variables accessible as {{ .Var.key }} in templates. Provides a way to define reusable values, especially useful with config includes.
publishers: Option<Vec<PublisherConfig>>Generic artifact publisher configurations.
dockerhub: Option<Vec<DockerHubConfig>>DockerHub description sync configurations.
artifactories: Option<Vec<ArtifactoryConfig>>Artifactory upload configurations.
cloudsmiths: Option<Vec<CloudSmithConfig>>CloudSmith publisher configurations.
homebrew_casks: Option<Vec<HomebrewCaskConfig>>Top-level Homebrew Cask configurations.
homebrew_casks is a top-level array with its own
repository, commit_author, directory, skip_upload, hooks, dependencies,
conflicts, completions, manpages, structured uninstall/zap, etc.
tag: Option<TagConfig>Automatic semantic version tagging configuration.
git: Option<GitConfig>Git-level tag discovery and sorting settings.
partial: Option<PartialConfig>Partial/split build configuration for fan-out CI pipelines.
workspaces: Option<Vec<WorkspaceConfig>>Independent workspace roots in a monorepo.
source: Option<SourceConfig>Source archive configuration.
sboms: Vec<SbomConfig>Software bill of materials (SBOM) generation configurations.
release: Option<ReleaseConfig>GitHub release configuration shared by all crates.
github_urls: Option<GitHubUrlsConfig>Custom GitHub API/upload/download URLs for GitHub Enterprise installations.
gitlab_urls: Option<GitLabUrlsConfig>Custom GitLab API/download URLs for self-hosted GitLab installations.
gitea_urls: Option<GiteaUrlsConfig>Custom Gitea API/download URLs for self-hosted Gitea installations.
force_token: Option<ForceTokenKind>Force a specific token type for authentication. When set, overrides automatic token detection from environment variables.
notarize: Option<NotarizeConfig>macOS code signing and notarization configuration.
metadata: Option<MetadataConfig>Project metadata configuration (applied to metadata.json output files).
template_files: Option<Vec<TemplateFileConfig>>Template files to render and include as release artifacts. File contents are processed through the template engine.
monorepo: Option<MonorepoConfig>GoReleaser Pro monorepo configuration. When configured, tag discovery filters by tag_prefix and the working directory is scoped to dir.
makeselfs: Vec<MakeselfConfig>Makeself self-extracting archive configurations.
srpms: Option<SrpmConfig>Source RPM configuration. Renamed from srpm: (singular) for spelling
parity with Defaults.srpms and the rest of the plural-name packaging
fields. The srpm: spelling is still accepted via serde alias for
back-compat.
milestones: Option<Vec<MilestoneConfig>>Milestone closing configurations.
uploads: Option<Vec<UploadConfig>>Generic HTTP upload configurations.
aur_sources: Option<Vec<AurSourceConfig>>AUR source package publishing configurations (source-only PKGBUILD, not -bin).
retry: Option<RetryConfig>Top-level retry configuration applied to network-bound operations
(announcers, git providers, HTTP uploads, docker pipes). When omitted,
RetryConfig::default() is used (10 attempts, 10s base, 5m cap —
matching GoReleaser Project.Retry).
mcp: McpConfigMCP (Model Context Protocol) server registry publishing
configuration. When name is empty (the default), the publisher is
skipped. Mirrors GoReleaser’s mcp: block.
Implementations§
Source§impl Config
impl Config
Sourcepub fn monorepo_tag_prefix(&self) -> Option<&str>
pub fn monorepo_tag_prefix(&self) -> Option<&str>
Return the monorepo tag prefix, if configured.
Shorthand for config.monorepo.as_ref().and_then(|m| m.tag_prefix.as_deref()).
Sourcepub fn monorepo_dir(&self) -> Option<&str>
pub fn monorepo_dir(&self) -> Option<&str>
Return the monorepo working directory, if configured.
Shorthand for config.monorepo.as_ref().and_then(|m| m.dir.as_deref()).
Sourcepub fn meta_homepage(&self) -> Option<&str>
pub fn meta_homepage(&self) -> Option<&str>
Project homepage from metadata.homepage (Pro default source for publishers).
Sourcepub fn meta_license(&self) -> Option<&str>
pub fn meta_license(&self) -> Option<&str>
Project license from metadata.license.
Sourcepub fn meta_description(&self) -> Option<&str>
pub fn meta_description(&self) -> Option<&str>
Project description from metadata.description.
Sourcepub fn meta_maintainers(&self) -> &[String]
pub fn meta_maintainers(&self) -> &[String]
Project maintainers from metadata.maintainers.
Sourcepub fn meta_first_maintainer(&self) -> Option<&str>
pub fn meta_first_maintainer(&self) -> Option<&str>
First maintainer as “Name
Sourcepub fn has_gpg_sign_configured(&self) -> bool
pub fn has_gpg_sign_configured(&self) -> bool
true when any top-level / workspace signs: or binary_signs:
entry will invoke gpg (via SignConfig::is_gpg()).
Used by preflight to decide whether to probe
gpg --faked-system-time support. docker_signs: is excluded
because that driver only ever invokes cosign.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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 Config
impl JsonSchema for Config
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