Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/openvmm-ci.yaml

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

8 changes: 7 additions & 1 deletion flowey/flowey_lib_common/src/publish_gh_release.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ pub struct GhReleaseParams<C = VarNotClaimed> {
///
/// e.g: the "bar" in "github.com/foo/bar"
pub repo_name: String,
/// Commit hash to target
pub target: ReadVar<String, C>,
/// Tag associated with the release artifact.
pub tag: ReadVar<String, C>,
/// Title associated with the release artifact.
Expand All @@ -36,6 +38,7 @@ impl GhReleaseParams {
let GhReleaseParams {
repo_owner,
repo_name,
target,
tag,
title,
files,
Expand All @@ -46,6 +49,7 @@ impl GhReleaseParams {
GhReleaseParams {
repo_owner,
repo_name,
target: target.claim(ctx),
tag: tag.claim(ctx),
title: title.claim(ctx),
files: files.claim(ctx),
Expand Down Expand Up @@ -86,6 +90,7 @@ impl FlowNode for Node {
let GhReleaseParams {
repo_owner,
repo_name,
target,
tag,
title,
files,
Expand All @@ -94,6 +99,7 @@ impl FlowNode for Node {
} = req;

let repo = format!("{repo_owner}/{repo_name}");
let target = rt.read(target);
let tag = rt.read(tag);

// check if the release already exists
Expand Down Expand Up @@ -128,7 +134,7 @@ impl FlowNode for Node {
.collect::<Vec<_>>();
let draft = draft.then_some("--draft");

flowey::shell_cmd!(rt, "{gh_cli} release create --repo {repo} {tag} --title {title} --notes TODO {draft...} {files...}").run()?;
flowey::shell_cmd!(rt, "{gh_cli} release create --repo {repo} --target {target} {tag} --title {title} --notes TODO {draft...} {files...}").run()?;
}

Ok(())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,22 @@ impl SimpleFlowNode for Node {
let tag = version.map(ctx, |v| format!("vmgstool-v{v}"));
let title = version.map(ctx, |v| format!("VmgsTool v{v}"));

let target = ctx.emit_rust_stepv("get current commit", |ctx| {
let openvmm_repo_path = openvmm_repo_path.claim(ctx);
move |rt| {
let path = rt.read(openvmm_repo_path);
rt.sh.change_dir(path);
let target = flowey::shell_cmd!(rt, "git rev-parse HEAD").read()?;
log::info!("current commit is {target}");
Ok(target)
}
});

ctx.req(flowey_lib_common::publish_gh_release::Request(
flowey_lib_common::publish_gh_release::GhReleaseParams {
repo_owner: "microsoft".into(),
repo_name: "openvmm".into(),
target,
tag,
title,
files,
Expand Down
Loading