Compare commits
2 Commits
00524783d1
...
e6cda3ad52
Author | SHA1 | Date | |
---|---|---|---|
|
e6cda3ad52 | ||
e1a2d03fbe |
19
CHANGELOG.md
19
CHANGELOG.md
@ -6,6 +6,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.4.0] - 2024-12-27
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- add release action
|
||||||
|
- remove deps
|
||||||
|
- remove ci
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- release action like main and pr
|
||||||
|
- *(deps)* update rust crate chrono to v0.4.39
|
||||||
|
- *(deps)* update rust crate tracing to v0.1.41
|
||||||
|
|
||||||
|
### Other
|
||||||
|
- *(deps)* update rust crate serde_json to v1.0.134
|
||||||
|
- *(deps)* update rust crate serde to v1.0.216
|
||||||
|
- *(deps)* update rust crate clap to v4.5.23
|
||||||
|
- *(deps)* update all dependencies
|
||||||
|
- *(deps)* update rust crate serde_json to v1.0.133
|
||||||
|
|
||||||
## [0.3.0] - 2024-11-16
|
## [0.3.0] - 2024-11-16
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -3,7 +3,7 @@ members = ["crates/*", "examples/*"]
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.3.0"
|
version = "0.4.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
authors = ["kjuulh <contact@kjuulh.io>"]
|
authors = ["kjuulh <contact@kjuulh.io>"]
|
||||||
|
@ -7,7 +7,7 @@ use futures::{stream, StreamExt};
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
dagger_middleware::{DaggerMiddleware, DynMiddleware},
|
dagger_middleware::{DaggerMiddleware, DynMiddleware},
|
||||||
Context, MainAction, PullRequestAction,
|
Context, MainAction, PullRequestAction, ReleaseAction,
|
||||||
};
|
};
|
||||||
|
|
||||||
use self::architecture::{Architecture, Os};
|
use self::architecture::{Architecture, Os};
|
||||||
@ -348,6 +348,32 @@ impl PullRequestAction for RustService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[async_trait]
|
||||||
|
impl ReleaseAction for RustService {
|
||||||
|
async fn execute_release(&self, ctx: &mut Context) -> eyre::Result<()> {
|
||||||
|
self.build_test().await?;
|
||||||
|
|
||||||
|
let container = self.build_release().await?;
|
||||||
|
|
||||||
|
let tag = {
|
||||||
|
if let Ok(tag) = std::env::var("RELEASE_TAG") {
|
||||||
|
tag
|
||||||
|
} else if let Ok(tag) = std::env::var("DRONE_TAG") {
|
||||||
|
tag
|
||||||
|
} else {
|
||||||
|
eyre::bail!("failed to find a valid tag");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
let tag = format!("docker.io/kasperhermansen/{}:{}", self.bin_name, tag);
|
||||||
|
|
||||||
|
container.publish(&tag).await?;
|
||||||
|
ctx.set_image_tag(tag)?;
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const IMAGE_TAG: &str = "RUST_SERVICE_IMAGE_TAG";
|
const IMAGE_TAG: &str = "RUST_SERVICE_IMAGE_TAG";
|
||||||
|
|
||||||
pub trait RustServiceContext {
|
pub trait RustServiceContext {
|
||||||
@ -488,8 +514,6 @@ pub mod extensions {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
#[cfg(any(feature = "dagger", feature = "integration"))]
|
#[cfg(any(feature = "dagger", feature = "integration"))]
|
||||||
async fn test_can_build_rust() -> eyre::Result<()> {
|
async fn test_can_build_rust() -> eyre::Result<()> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user