diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eecd466..9d4f736 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,6 +29,8 @@ jobs: run: npm run build && electron-builder --linux && electron-builder --arm64 --linux && electron-builder --armv7l --linux env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: List all files in the dist directory + run: ls -l dist - name: Delete unpacked builds run: rm -rf dist/linux-unpacked && rm -rf dist/linux-arm64-unpacked && rm -rf dist/linux-armv7l-unpacked - name: Upload artifact @@ -59,6 +61,8 @@ jobs: run: npm run build && electron-builder --macos env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: List all files in the dist directory + run: ls -l dist - name: Delete unpacked builds run: rm -rf dist/macos-unpacked @@ -103,9 +107,6 @@ jobs: needs: [build-linux, build-mac, build-windows] steps: - - name: Checkout code - uses: actions/checkout@v2 - - uses: actions/download-artifact@v2 with: name: ArmCordMac @@ -120,7 +121,10 @@ jobs: with: name: ArmCordLinux path: linux - + - name: ls + run: ls + - name: Delete unwanted directories + run: ls -d linux/*/ | xargs rm -rf && ls -d macos/*/ | xargs rm -rf && ls -d windows/*/ | xargs rm -rf - name: Get some values needed for the release id: vars shell: bash @@ -157,45 +161,32 @@ 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 (await fs.stat(`./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 (await fs.stat(`./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 (await fs.stat(`./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 }}