Merge pull request #102 from Loyalsoldier/fix-file-empty

Fix: skip uploading empty files
This commit is contained in:
Sven-Hendrik Haase 2023-05-22 02:13:13 +02:00 committed by GitHub
commit 0c6fec2cea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,6 +67,10 @@ async function upload_to_release(
return return
} }
const file_size = stat.size 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) const file_bytes: any = fs.createReadStream(file)
// Check for duplicates. // Check for duplicates.