mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-05-11 19:04:20 +00:00
improve info ux
This commit is contained in:
parent
445ef7dd5c
commit
5c57a70256
2 changed files with 16 additions and 15 deletions
10
src/main.rs
10
src/main.rs
|
@ -1,6 +1,6 @@
|
|||
mod github;
|
||||
|
||||
use github::{AssetUploader, Release, Releaser};
|
||||
use github::{AssetUploader, Release, ReleaseResponse, Releaser};
|
||||
use reqwest::Client;
|
||||
use serde::Deserialize;
|
||||
use std::{
|
||||
|
@ -57,7 +57,7 @@ fn run(
|
|||
return Ok(());
|
||||
}
|
||||
|
||||
let release_id = releaser.release(
|
||||
let ReleaseResponse { id, html_url } = releaser.release(
|
||||
conf.github_token.as_str(),
|
||||
conf.github_repository.as_str(),
|
||||
release(&conf),
|
||||
|
@ -73,15 +73,17 @@ fn run(
|
|||
Ok(paths)
|
||||
});
|
||||
for path in paths? {
|
||||
log::info!("Uploading path {}", path.display());
|
||||
log::info!("⬆️ Uploading path {}", path.display());
|
||||
uploader.upload(
|
||||
conf.github_token.as_str(),
|
||||
conf.github_repository.as_str(),
|
||||
release_id,
|
||||
id,
|
||||
mime_or_default(&path),
|
||||
File::open(path)?,
|
||||
)?;
|
||||
}
|
||||
|
||||
println!("🎉 Release ready at {}", html_url);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue