uv_configuration/trusted_publishing.rs
1use serde::{Deserialize, Serialize};
2
3#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Eq, Serialize)]
4#[serde(rename_all = "kebab-case")]
5#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
6#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
7pub enum TrustedPublishing {
8 /// Attempt trusted publishing when we're in a supported environment, continue if that fails.
9 ///
10 /// Supported environments include GitHub Actions and GitLab CI/CD.
11 #[default]
12 Automatic,
13 // Force trusted publishing.
14 Always,
15 // Never try to get a trusted publishing token.
16 Never,
17}