From 1a9128f06da2e13996d25c775fcc03485cb2773a Mon Sep 17 00:00:00 2001 From: Mike A Date: Sat, 28 Oct 2023 19:52:09 +0200 Subject: [PATCH 1/5] Test artifact collection --- .github/workflows/build.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 79f9154..4b41647 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,3 +65,12 @@ jobs: with: name: rpi-4b-aarch64 path: dist + + Collect-Artifacts: + runs-on: ubuntu-22.04 + steps: + - name: Download artifacts + uses: actions/download-artifact@v3 + + - name: Display structure of downloaded files + run: ls -R From e0aed32ab42c41c8d9609482ce45914e7113e814 Mon Sep 17 00:00:00 2001 From: Mike A Date: Sat, 28 Oct 2023 20:24:31 +0200 Subject: [PATCH 2/5] Download artifacts by name --- .github/workflows/build.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4b41647..7bde182 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,9 +68,37 @@ jobs: Collect-Artifacts: runs-on: ubuntu-22.04 + needs: [Build-PC, Build-RPI] steps: - - name: Download artifacts + - name: Download ubuntu-22.04-x64 uses: actions/download-artifact@v3 + with: + name: ubuntu-22.04-x64 + path: RiiTag-RPC_Ubuntu22 + + - name: Download ubuntu-20.04-x64 + uses: actions/download-artifact@v3 + with: + name: ubuntu-20.04-x64 + path: RiiTag-RPC_Ubuntu20 + + - name: Download macos-12-x64 + uses: actions/download-artifact@v3 + with: + name: macos-12-x64 + path: RiiTag-RPC_MacOS + + - name: Download windows-2022-x64 + uses: actions/download-artifact@v3 + with: + name: windows-2022-x64 + path: RiiTag-RPC_Windows + + - name: Download rpi-4b-aarch64 + uses: actions/download-artifact@v3 + with: + name: rpi-4b-aarch64 + path: RiiTag-RPC_Rpi4B - name: Display structure of downloaded files run: ls -R From 417648218ad4a0de66463d452ad4d620a1c6bb98 Mon Sep 17 00:00:00 2001 From: Mike A Date: Sat, 28 Oct 2023 20:41:53 +0200 Subject: [PATCH 3/5] Upload collected artifact --- .github/workflows/build.yml | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7bde182..8679f29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,31 +74,51 @@ jobs: uses: actions/download-artifact@v3 with: name: ubuntu-22.04-x64 - path: RiiTag-RPC_Ubuntu22 + path: ubuntu22 - name: Download ubuntu-20.04-x64 uses: actions/download-artifact@v3 with: name: ubuntu-20.04-x64 - path: RiiTag-RPC_Ubuntu20 + path: ubuntu20 - name: Download macos-12-x64 uses: actions/download-artifact@v3 with: name: macos-12-x64 - path: RiiTag-RPC_MacOS + path: macos - name: Download windows-2022-x64 uses: actions/download-artifact@v3 with: name: windows-2022-x64 - path: RiiTag-RPC_Windows + path: windows - name: Download rpi-4b-aarch64 uses: actions/download-artifact@v3 with: name: rpi-4b-aarch64 - path: RiiTag-RPC_Rpi4B + path: rpi4b - - name: Display structure of downloaded files - run: ls -R + - name: Collect artifacts + run: | + mkdir -p releases + mv ubuntu22/riitag-rpc releases/RiiTag-RPC_Ubuntu22 + mv ubuntu20/riitag-rpc releases/RiiTag-RPC_Ubuntu20 + mv macos/riitag-rpc releases/RiiTag-RPC_MacOS + mv windows/riitag-rpc releases/RiiTag-RPC_Windows + mv rpi4b/riitag-rpc releases/RiiTag-RPC_Rpi4B + tar -cvf all-artifacts.tar.bz2 releases/ + + - name: Upload collected artifacts + uses: actions/upload-artifact@v3 + with: + name: all-artifacts + path: all-artifacts.tar.bz2 + + - name: Create release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + draft: true + files: releases/* From d6521ffd8439bec897b329f6b8acf82850a831a3 Mon Sep 17 00:00:00 2001 From: Mike A Date: Sat, 28 Oct 2023 20:49:13 +0200 Subject: [PATCH 4/5] Add file extension to windows exe --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8679f29..16ed673 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -103,11 +103,11 @@ jobs: - name: Collect artifacts run: | mkdir -p releases - mv ubuntu22/riitag-rpc releases/RiiTag-RPC_Ubuntu22 - mv ubuntu20/riitag-rpc releases/RiiTag-RPC_Ubuntu20 - mv macos/riitag-rpc releases/RiiTag-RPC_MacOS - mv windows/riitag-rpc releases/RiiTag-RPC_Windows - mv rpi4b/riitag-rpc releases/RiiTag-RPC_Rpi4B + mv ubuntu22/riitag-rpc releases/RiiTag-RPC_Ubuntu22 + mv ubuntu20/riitag-rpc releases/RiiTag-RPC_Ubuntu20 + mv macos/riitag-rpc releases/RiiTag-RPC_MacOS + mv windows/riitag-rpc.exe releases/RiiTag-RPC_Windows + mv rpi4b/riitag-rpc releases/RiiTag-RPC_Rpi4B tar -cvf all-artifacts.tar.bz2 releases/ - name: Upload collected artifacts From 84fea0fc634c67a3d2cb3eaeace8a3051c29d224 Mon Sep 17 00:00:00 2001 From: Mike A Date: Sat, 28 Oct 2023 20:53:54 +0200 Subject: [PATCH 5/5] Re-mark collected artifacts as executable --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 16ed673..de52deb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -108,6 +108,7 @@ jobs: mv macos/riitag-rpc releases/RiiTag-RPC_MacOS mv windows/riitag-rpc.exe releases/RiiTag-RPC_Windows mv rpi4b/riitag-rpc releases/RiiTag-RPC_Rpi4B + chmod -R +x releases/ tar -cvf all-artifacts.tar.bz2 releases/ - name: Upload collected artifacts