Skip to content

Commit

Permalink
2024-05-01
Browse files Browse the repository at this point in the history
  • Loading branch information
bestia.dev committed May 1, 2024
1 parent 9b153ab commit 9708a8f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions automation_tasks_rs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ fn task_github_new_release() {
use tokio::runtime::Runtime;
let rt = Runtime::new().unwrap();
rt.block_on(async move {
let owner = cargo_auto_github_lib::github_owner();
let github_owner = cargo_auto_github_lib::github_owner();
let repo_name = cargo_toml.package_name();
let tag_name_version = format!("v{}", cargo_toml.package_version());
let release_name = format!("Release v{}", cargo_toml.package_version());
Expand All @@ -254,19 +254,19 @@ r#"## Changed
"#);

let release_id = auto_github_create_new_release(&owner, &repo_name, &tag_name_version, &release_name, branch, body_md_text).await;
let release_id = auto_github_create_new_release(&github_owner, &repo_name, &tag_name_version, &release_name, branch, body_md_text).await;
println!(" {YELLOW}New release created, now uploading release asset. This can take some time if the files are big. Wait...{RESET}");

// compress files tar.gz
let tar_name = format!("{repo_name}-{tag_name_version}-x86_64-unknown-linux-gnu.tar.gz");
cl::run_shell_command(&format!("tar -zcvf {tar_name} target/release/{repo_name}"));

// upload asset
auto_github_upload_asset_to_release(&owner, &repo_name, &release_id, &tar_name).await;
auto_github_upload_asset_to_release(&github_owner, &repo_name, &release_id, &tar_name).await;
cl::run_shell_command(&format!("rm {tar_name}"));

println!(" {YELLOW}Asset uploaded. Open and edit the description on Github-Releases in the browser.{RESET}");
println!("{GREEN}https://github.com/{owner}/{repo_name}/releases{RESET}");
println!("{GREEN}https://github.com/{github_owner}/{repo_name}/releases{RESET}");
});
}
// endregion: tasks

0 comments on commit 9708a8f

Please sign in to comment.