diff --git a/Cargo.lock b/Cargo.lock index ba5bd94..3a62f87 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -144,15 +144,6 @@ name = "gh-workflow-gen" version = "0.1.0" dependencies = [ "gh-workflow", - "gh-workflow-release-plz", -] - -[[package]] -name = "gh-workflow-release-plz" -version = "0.1.0" -dependencies = [ - "derive_setters", - "gh-workflow", ] [[package]] diff --git a/workspace/gh-workflow-gen/Cargo.toml b/workspace/gh-workflow-gen/Cargo.toml index 3da21b1..2311984 100644 --- a/workspace/gh-workflow-gen/Cargo.toml +++ b/workspace/gh-workflow-gen/Cargo.toml @@ -7,4 +7,3 @@ publish = false [build-dependencies] gh-workflow = { path = "../gh-workflow" } -gh-workflow-release-plz = { path = "../gh-workflow-release-plz" } diff --git a/workspace/gh-workflow-gen/build.rs b/workspace/gh-workflow-gen/build.rs index b2112f4..8a05157 100644 --- a/workspace/gh-workflow-gen/build.rs +++ b/workspace/gh-workflow-gen/build.rs @@ -1,5 +1,5 @@ use gh_workflow::*; -use gh_workflow_release_plz::ReleasePlz; +use release_plz::Release; use toolchain::Toolchain; fn main() { @@ -51,7 +51,7 @@ fn main() { .needs("build") .permissions(permissions) .add_step(Step::checkout()) - .add_step(ReleasePlz::default()); + .add_step(Release::default()); Workflow::new("Build and Test") .add_env(flags) diff --git a/workspace/gh-workflow-release-plz/Cargo.toml b/workspace/gh-workflow-release-plz/Cargo.toml deleted file mode 100644 index 9a1e06d..0000000 --- a/workspace/gh-workflow-release-plz/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "gh-workflow-release-plz" -version = "0.1.0" -edition = "2021" - -description = "A type safe implementation of Release Please powered by gh-workflow" -license = "Apache-2.0" -documentation = "https://docs.rs/gh-workflow-release-plz" -homepage = "https://github.com/tailcallhq/rust-gh-workflow" -repository = "https://github.com/tailcallhq/rust-gh-workflow" - -[dependencies] -derive_setters = "0.1.6" -gh-workflow = { path = "../gh-workflow" } diff --git a/workspace/gh-workflow-release-plz/src/lib.rs b/workspace/gh-workflow-release-plz/src/lib.rs deleted file mode 100644 index 5aae915..0000000 --- a/workspace/gh-workflow-release-plz/src/lib.rs +++ /dev/null @@ -1,2 +0,0 @@ -mod release; -pub use release::*; diff --git a/workspace/gh-workflow/src/lib.rs b/workspace/gh-workflow/src/lib.rs index fa3306c..368524e 100644 --- a/workspace/gh-workflow/src/lib.rs +++ b/workspace/gh-workflow/src/lib.rs @@ -2,6 +2,7 @@ mod cargo; pub mod error; mod event; pub mod generate; +pub mod release_plz; mod rust_flag; pub mod toolchain; pub(crate) mod workflow; diff --git a/workspace/gh-workflow-release-plz/src/release.rs b/workspace/gh-workflow/src/release_plz.rs similarity index 95% rename from workspace/gh-workflow-release-plz/src/release.rs rename to workspace/gh-workflow/src/release_plz.rs index da783c5..35a10f8 100644 --- a/workspace/gh-workflow-release-plz/src/release.rs +++ b/workspace/gh-workflow/src/release_plz.rs @@ -1,9 +1,10 @@ use derive_setters::Setters; -use gh_workflow::{Step, Use}; + +use crate::{Step, Use}; #[derive(Clone, Default, Setters)] #[setters(strip_option, into)] -pub struct ReleasePlz { +pub struct Release { /// The release-plz command to run. Accepted values: release-pr, release. /// (By default it runs both commands). pub command: Option, @@ -68,8 +69,8 @@ impl std::fmt::Display for Backend { } } -impl From for Step { - fn from(value: ReleasePlz) -> Self { +impl From for Step { + fn from(value: Release) -> Self { let mut step = Step::uses("MarcoIeni", "release-plz-action", "0.5").name("Release Plz"); if let Some(command) = value.command {