Skip to content

Commit

Permalink
chore: move release_plz into workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharmath committed Nov 11, 2024
1 parent 34f9302 commit ac76d84
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 32 deletions.
9 changes: 0 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion workspace/gh-workflow-gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ publish = false
[build-dependencies]

gh-workflow = { path = "../gh-workflow" }
gh-workflow-release-plz = { path = "../gh-workflow-release-plz" }
4 changes: 2 additions & 2 deletions workspace/gh-workflow-gen/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use gh_workflow::*;
use gh_workflow_release_plz::ReleasePlz;
use release_plz::Release;
use toolchain::Toolchain;

fn main() {
Expand Down Expand Up @@ -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)
Expand Down
14 changes: 0 additions & 14 deletions workspace/gh-workflow-release-plz/Cargo.toml

This file was deleted.

2 changes: 0 additions & 2 deletions workspace/gh-workflow-release-plz/src/lib.rs

This file was deleted.

1 change: 1 addition & 0 deletions workspace/gh-workflow/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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<Command>,
Expand Down Expand Up @@ -68,8 +69,8 @@ impl std::fmt::Display for Backend {
}
}

impl From<ReleasePlz> for Step<Use> {
fn from(value: ReleasePlz) -> Self {
impl From<Release> for Step<Use> {
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 {
Expand Down

0 comments on commit ac76d84

Please sign in to comment.