From 9aaffec54d395fd722372d02b9410a31562fd281 Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Tue, 24 May 2022 12:03:03 +0200 Subject: [PATCH 1/4] Add listing all files in dist dir --- .github/workflows/build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eecd466..07705e4 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 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 dist - name: Delete unpacked builds run: rm -rf dist/macos-unpacked @@ -140,7 +144,7 @@ jobs: script: | console.log('environment', process.versions); - const fs = require('fs').promises; + const fs = require('fs'); const { repo: { owner, repo }, sha } = context; console.log({ owner, repo, sha }); From 00ecd5ab465b392c5a1834646e23e7ba52f7f7df Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Tue, 24 May 2022 12:39:14 +0200 Subject: [PATCH 2/4] Ultimate CI fix --- .github/workflows/build.yml | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 07705e4..fcaa213 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: List all files in the dist directory - run: ls dist + 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 @@ -62,7 +62,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: List all files in the dist directory - run: ls dist + run: ls -l dist - name: Delete unpacked builds run: rm -rf dist/macos-unpacked @@ -124,7 +124,8 @@ jobs: with: name: ArmCordLinux path: linux - + - 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 @@ -161,45 +162,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 }} From 3fd9817d4f217d64330b48c2767381aea7b94c20 Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Tue, 24 May 2022 12:52:15 +0200 Subject: [PATCH 3/4] I forgor --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fcaa213..d192ba6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -145,7 +145,7 @@ jobs: script: | console.log('environment', process.versions); - const fs = require('fs'); + const fs = require('fs').promises; const { repo: { owner, repo }, sha } = context; console.log({ owner, repo, sha }); From a619bd50a2baffb773f3970d2f40ad6e163ece7f Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Tue, 24 May 2022 13:45:13 +0200 Subject: [PATCH 4/4] ls --- .github/workflows/build.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d192ba6..9d4f736 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -107,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 @@ -124,8 +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 + 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