mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-05-10 10:44:19 +00:00
Add assets
action output (#185)
This commit is contained in:
parent
b260a9f8a6
commit
58fa4b7a88
5 changed files with 15 additions and 5 deletions
11
src/main.ts
11
src/main.ts
|
@ -65,20 +65,23 @@ async function run() {
|
|||
if (files.length == 0) {
|
||||
console.warn(`🤔 ${config.input_files} not include valid file.`);
|
||||
}
|
||||
const currentAsserts = rel.assets;
|
||||
await Promise.all(
|
||||
const currentAssets = rel.assets;
|
||||
const assets = await Promise.all(
|
||||
files.map(async path => {
|
||||
await upload(
|
||||
const json = await upload(
|
||||
config,
|
||||
gh,
|
||||
uploadUrl(rel.upload_url),
|
||||
path,
|
||||
currentAsserts
|
||||
currentAssets
|
||||
);
|
||||
delete json.uploader;
|
||||
return json;
|
||||
})
|
||||
).catch(error => {
|
||||
throw error;
|
||||
});
|
||||
setOutput("assets", assets);
|
||||
}
|
||||
console.log(`🎉 Release ready at ${rel.html_url}`);
|
||||
setOutput("url", rel.html_url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue