mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-05-13 19:54:20 +00:00
Add input option overwrite_files.
This commit is contained in:
parent
c9b46fe7aa
commit
40ca4763d5
7 changed files with 52 additions and 19 deletions
28
src/main.ts
28
src/main.ts
|
@ -67,17 +67,23 @@ async function run() {
|
|||
}
|
||||
const currentAssets = rel.assets;
|
||||
const assets = await Promise.all(
|
||||
files.map(async (path) => {
|
||||
const json = await upload(
|
||||
config,
|
||||
gh,
|
||||
uploadUrl(rel.upload_url),
|
||||
path,
|
||||
currentAssets
|
||||
);
|
||||
delete json.uploader;
|
||||
return json;
|
||||
})
|
||||
files
|
||||
.map(async (path) => {
|
||||
const json = await upload(
|
||||
config,
|
||||
gh,
|
||||
uploadUrl(rel.upload_url),
|
||||
path,
|
||||
currentAssets
|
||||
);
|
||||
|
||||
if (json) {
|
||||
delete json.uploader;
|
||||
}
|
||||
|
||||
return json;
|
||||
})
|
||||
.filter((json) => json !== null)
|
||||
).catch((error) => {
|
||||
throw error;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue