fix: release action like main and pr
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-12-22 12:24:21 +01:00
parent b1358a7e5e
commit 2d48b523c3

View File

@ -63,8 +63,12 @@ impl CuddleCI {
self
}
pub fn with_release(&mut self, release: Box<dyn ReleaseAction + Send + Sync>) -> &mut Self {
self.release_action.push(release);
pub fn with_release<T>(&mut self, release: &T) -> &mut Self
where
T: ReleaseAction + Send + Sync + 'static,
T: ToOwned<Owned = T>,
{
self.release_action.push(Box::new(release.to_owned()));
self
}