From eb94a4c4c93dfdab4cbb01b30e553c9f8f2d4318 Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Mon, 23 May 2022 19:43:00 +0200 Subject: [PATCH] fix --- .github/workflows/build.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 770095b..c4a9f88 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -158,34 +158,45 @@ jobs: // do whatever filtering you want here, I'm just uploading all the files console.log('uploading', file); + if (fs.lstatSync(`./linux/${file}`).isDirectory()) { + console.log("directory, skipping") + } else { await github.repos.uploadReleaseAsset({ owner, repo, release_id: release.data.id, name: file, data: await fs.readFile(`./linux/${file}`) - }); + }); + } } for (let file of await fs.readdir('windows')) { // do whatever filtering you want here, I'm just uploading all the files console.log('uploading', file); - + if (fs.lstatSync(`./windows/${file}`).isDirectory()) { + console.log("directory, skipping") + } else { await github.repos.uploadReleaseAsset({ owner, repo, release_id: release.data.id, name: file, data: await fs.readFile(`./windows/${file}`) - }); + }); + } } for (let file of await fs.readdir('macos')) { // do whatever filtering you want here, I'm just uploading all the files console.log('uploading', file); + if (fs.lstatSync(`./macos/${file}`).isDirectory()) { + console.log("directory, skipping") + } else { await github.repos.uploadReleaseAsset({ owner, repo, release_id: release.data.id, name: file, data: await fs.readFile(`./macos/${file}`) - }); + }); + } } env: releaseTag: ${{ steps.vars.outputs.releaseTag }}