mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-17 13:58:29 +00:00
Implement trusted publishing (#7548)
Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
This commit is contained in:
parent
c053dc84f4
commit
205bf8cabe
22 changed files with 502 additions and 40 deletions
|
@ -16,6 +16,7 @@ pub use preview::*;
|
|||
pub use sources::*;
|
||||
pub use target_triple::*;
|
||||
pub use trusted_host::*;
|
||||
pub use trusted_publishing::*;
|
||||
|
||||
mod authentication;
|
||||
mod build_options;
|
||||
|
@ -35,3 +36,4 @@ mod preview;
|
|||
mod sources;
|
||||
mod target_triple;
|
||||
mod trusted_host;
|
||||
mod trusted_publishing;
|
||||
|
|
15
crates/uv-configuration/src/trusted_publishing.rs
Normal file
15
crates/uv-configuration/src/trusted_publishing.rs
Normal file
|
@ -0,0 +1,15 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Eq, Serialize)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
|
||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||
pub enum TrustedPublishing {
|
||||
/// Try trusted publishing when we're already in GitHub Actions, continue if that fails.
|
||||
#[default]
|
||||
Automatic,
|
||||
// Force trusted publishing.
|
||||
Always,
|
||||
// Never try to get a trusted publishing token.
|
||||
Never,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue