From 99e2100a1fe464c16de42fe2b684661adae444dc Mon Sep 17 00:00:00 2001 From: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com> Date: Thu, 11 May 2023 14:47:45 +0800 Subject: [PATCH] Fix: skip uploading empty files --- src/main.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.ts b/src/main.ts index b45d346..3526243 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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.