From 87733f18535a2a78bd124228fa2f544cb00cf24f Mon Sep 17 00:00:00 2001 From: Ash Manning Date: Tue, 2 Apr 2024 03:20:00 +0800 Subject: [PATCH] CI: upload build artifacts to releases.drivechain.info --- .github/workflows/build.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dcf4021cb..c734fd07a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,7 @@ on: branches: - "master" - "sidechain" + workflow_dispatch: jobs: build: @@ -88,3 +89,32 @@ jobs: if-no-files-found: error # Asterisk is for matching both 'sidegeth' and 'sidegeth.exe' path: work/build/bin/sidegeth* + + + upload-artifacts-to-releases-drivechain-info: + name: Upload artifacts to releases.drivechain.info + runs-on: ubuntu-latest + needs: [build] + if: github.repository_owner == 'LayerTwo-Labs' + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + + - name: Zip artifacts + run: | + mv binaries-Linux ethSide-latest-linux + zip -r ethSide-latest-linux.zip ethSide-latest-linux + mv binaries-macOS ethSide-latest-macos + zip -r ethSide-latest-macOS.zip ethSide-latest-macos + mv binaries-Windows ethSide-latest-windows + zip -r ethSide-latest-windows.zip ethSide-latest-windows + + - name: Upload artifacts to releases.drivechain.info + uses: cross-the-world/ssh-scp-ssh-pipelines@latest + with: + host: 45.33.96.47 + user: root + pass: ${{ secrets.RELEASES_SERVER_PW }} + port: 22 + scp: | + 'ethSide-latest-*.zip' => '/var/www/html/' \ No newline at end of file