From 5d0c29c40974cc67428e25b7c985c449e6268589 Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Mon, 23 May 2022 18:42:57 +0200 Subject: [PATCH 1/7] oop --- .github/workflows/build.yml | 5 ----- .vscode/settings.json | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 40a30e0..43ae97a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -121,11 +121,6 @@ jobs: name: ArmCordLinux path: linux - - uses: actions/download-artifact@v2 - with: - name: ArmCordLinuxArm64 - path: linux - - name: Get some values needed for the release id: vars shell: bash diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..82f010b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "yaml.schemas": { + "https://json.schemastore.org/github-workflow.json": "file:///home/smartfridge/Documents/ArmCord/.github/workflows/build.yml" + } +} \ No newline at end of file From 7ca079025ffa4b628800f921e738430391a00f15 Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Mon, 23 May 2022 19:07:14 +0200 Subject: [PATCH 2/7] it's getting late --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43ae97a..770095b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -130,7 +130,7 @@ jobs: - uses: dev-drprasad/delete-tag-and-release@v0.2.0 with: delete_release: true - tag_name: ${{ steps.vars.outputs.releaseTag }} + tag_name: v3.0.6 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create Release @@ -187,3 +187,5 @@ jobs: data: await fs.readFile(`./macos/${file}`) }); } + env: + releaseTag: ${{ steps.vars.outputs.releaseTag }} 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 3/7] 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 }} From 347916f582f3a0c7de9ff78898e433ab1c85082b Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Mon, 23 May 2022 20:09:10 +0200 Subject: [PATCH 4/7] fix --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c4a9f88..8dad0b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -158,7 +158,7 @@ jobs: // do whatever filtering you want here, I'm just uploading all the files console.log('uploading', file); - if (fs.lstatSync(`./linux/${file}`).isDirectory()) { + if (fs.lstat(`./linux/${file}`).isDirectory()) { console.log("directory, skipping") } else { await github.repos.uploadReleaseAsset({ @@ -172,7 +172,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.lstatSync(`./windows/${file}`).isDirectory()) { + if (fs.lstat(`./windows/${file}`).isDirectory()) { console.log("directory, skipping") } else { await github.repos.uploadReleaseAsset({ @@ -187,7 +187,7 @@ jobs: // do whatever filtering you want here, I'm just uploading all the files console.log('uploading', file); - if (fs.lstatSync(`./macos/${file}`).isDirectory()) { + if (fs.lstat(`./macos/${file}`).isDirectory()) { console.log("directory, skipping") } else { await github.repos.uploadReleaseAsset({ From ebaa34081484e08d761d58c5561e59525544c9f3 Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Mon, 23 May 2022 20:35:49 +0200 Subject: [PATCH 5/7] e --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8dad0b5..7949ba3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -158,7 +158,7 @@ jobs: // do whatever filtering you want here, I'm just uploading all the files console.log('uploading', file); - if (fs.lstat(`./linux/${file}`).isDirectory()) { + if (fs.statSync(`./linux/${file}`).isDirectory()) { console.log("directory, skipping") } else { await github.repos.uploadReleaseAsset({ @@ -172,7 +172,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.lstat(`./windows/${file}`).isDirectory()) { + if (fs.statSync(`./windows/${file}`).isDirectory()) { console.log("directory, skipping") } else { await github.repos.uploadReleaseAsset({ @@ -187,7 +187,7 @@ jobs: // do whatever filtering you want here, I'm just uploading all the files console.log('uploading', file); - if (fs.lstat(`./macos/${file}`).isDirectory()) { + if (fs.statSync(`./macos/${file}`).isDirectory()) { console.log("directory, skipping") } else { await github.repos.uploadReleaseAsset({ From c1e60574d44039470352f4458b93300bda8a52c3 Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Mon, 23 May 2022 20:56:01 +0200 Subject: [PATCH 6/7] ugh --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7949ba3..170a415 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -158,7 +158,7 @@ jobs: // do whatever filtering you want here, I'm just uploading all the files console.log('uploading', file); - if (fs.statSync(`./linux/${file}`).isDirectory()) { + if (fs.stat(`./linux/${file}`).isDirectory()) { console.log("directory, skipping") } else { await github.repos.uploadReleaseAsset({ @@ -172,7 +172,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.statSync(`./windows/${file}`).isDirectory()) { + if (fs.stat(`./windows/${file}`).isDirectory()) { console.log("directory, skipping") } else { await github.repos.uploadReleaseAsset({ @@ -187,7 +187,7 @@ jobs: // do whatever filtering you want here, I'm just uploading all the files console.log('uploading', file); - if (fs.statSync(`./macos/${file}`).isDirectory()) { + if (fs.stat(`./macos/${file}`).isDirectory()) { console.log("directory, skipping") } else { await github.repos.uploadReleaseAsset({ From 713dee231db84adc9c2c32f30276ab024b495dbd Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Mon, 23 May 2022 21:52:10 +0200 Subject: [PATCH 7/7] f --- .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 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({