Fix: skip uploading empty files

This commit is contained in:
Loyalsoldier 2023-05-11 14:47:45 +08:00
parent 664a7c20c1
commit 99e2100a1f
No known key found for this signature in database
GPG Key ID: 23829BBC1ACF2C90

View File

@ -67,6 +67,10 @@ async function upload_to_release(
return
}
const file_size = stat.size
if (file_size === 0) {
core.debug(`Skipping ${file}, since its size is 0`)
return
}
const file_bytes: any = fs.createReadStream(file)
// Check for duplicates.