1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use super::{ExtraFileSpec, StringOrBool, TemplatedExtraFile, deserialize_string_or_bool_opt};
// ---------------------------------------------------------------------------
// PublisherConfig
// ---------------------------------------------------------------------------
#[derive(Debug, Clone, Serialize, Deserialize, Default, JsonSchema)]
#[serde(default)]
pub struct PublisherConfig {
/// Human-readable name for this publisher (used in logs).
pub name: Option<String>,
/// Command to invoke for publishing.
pub cmd: String,
/// Arguments passed to the publish command (supports templates).
pub args: Option<Vec<String>>,
/// Build IDs filter: only publish artifacts from builds whose `id` is in this list.
pub ids: Option<Vec<String>>,
/// Artifact type filter: only publish artifacts of these types (e.g., "archive", "binary").
pub artifact_types: Option<Vec<String>>,
/// Environment variables passed to the publish command.
#[serde(default)]
pub env: Option<Vec<String>>,
/// Working directory for the publisher command.
pub dir: Option<String>,
/// Template-conditional skip: if rendered result is `"true"`, skip this publisher.
/// Accepts bool or template string (e.g. `"{{ if .IsSnapshot }}true{{ endif }}"`).
#[serde(deserialize_with = "deserialize_string_or_bool_opt", default)]
pub skip: Option<StringOrBool>,
/// Include checksums in published artifacts.
pub checksum: Option<bool>,
/// Include signatures in published artifacts.
pub signature: Option<bool>,
/// Include metadata artifacts in published artifacts.
pub meta: Option<bool>,
/// Extra files to include in publishing (glob patterns with optional name override).
pub extra_files: Option<Vec<ExtraFileSpec>>,
/// Extra files whose contents are rendered through the template engine before publishing.
/// Unlike `extra_files` which copy as-is, template variables like `{{ .Tag }}` are expanded.
/// GoReleaser Pro feature.
pub templated_extra_files: Option<Vec<TemplatedExtraFile>>,
}