diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 170a415..eecd466 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -157,8 +157,7 @@ jobs: for (let file of await fs.readdir('linux')) { // do whatever filtering you want here, I'm just uploading all the files console.log('uploading', file); - - if (fs.stat(`./linux/${file}`).isDirectory()) { + if (await fs.stat(`./linux/${file}`).isDirectory()) { console.log("directory, skipping") } else { await github.repos.uploadReleaseAsset({ @@ -172,7 +171,7 @@ jobs: 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.stat(`./windows/${file}`).isDirectory()) { + if (await fs.stat(`./windows/${file}`).isDirectory()) { console.log("directory, skipping") } else { await github.repos.uploadReleaseAsset({ @@ -187,7 +186,7 @@ jobs: // do whatever filtering you want here, I'm just uploading all the files console.log('uploading', file); - if (fs.stat(`./macos/${file}`).isDirectory()) { + if (await fs.stat(`./macos/${file}`).isDirectory()) { console.log("directory, skipping") } else { await github.repos.uploadReleaseAsset({