mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-11-17 11:29:49 +00:00
print status of uploads
This commit is contained in:
11
src/main.rs
11
src/main.rs
@@ -87,24 +87,23 @@ fn run(
|
||||
conf.github_repository.as_str(),
|
||||
release(&conf),
|
||||
)?;
|
||||
println!("name {:#?}", conf.input_name);
|
||||
println!("files {:#?}", conf.input_files);
|
||||
|
||||
if let Some(patterns) = conf.input_files {
|
||||
for path in paths(patterns)? {
|
||||
println!("⬆️ Uploading asset {}", path.display());
|
||||
uploader.upload(
|
||||
let status = uploader.upload(
|
||||
conf.github_token.as_str(),
|
||||
conf.github_repository.as_str(),
|
||||
id,
|
||||
mime_or_default(&path),
|
||||
File::open(path)?,
|
||||
)?;
|
||||
println!("uploaded with status {}", status);
|
||||
}
|
||||
|
||||
println!("🎉 Release ready at {}", html_url);
|
||||
}
|
||||
|
||||
println!("🎉 Release ready at {}", html_url);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -187,7 +186,7 @@ mod tests {
|
||||
github_repository: "foo/bar".into(),
|
||||
input_name: Some("test release".into()),
|
||||
input_body: Some(":)".into()),
|
||||
input_files: Some(vec!["*.md".into()])
|
||||
input_files: Some(vec!["*.md".into()]),
|
||||
},
|
||||
)] {
|
||||
assert_eq!(expect, envy::from_iter::<_, Config>(env)?)
|
||||
|
||||
Reference in New Issue
Block a user