From bee22b976cfa602f952f2410f11d644f38e98a1b Mon Sep 17 00:00:00 2001 From: Edo Date: Sun, 14 Jan 2024 12:53:22 +0100 Subject: [PATCH] build: deploy release binary --- .github/workflows/build.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bd13f6f..7601bf6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -160,3 +160,30 @@ jobs: name: macos-${{matrix.arch}}-${{matrix.configuration}} path: | build/bin/${{matrix.arch}}/${{matrix.configuration}}/aw-installer + + deploy: + name: Deploy artifacts + needs: [build-win, build-linux, build-macos] + runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + steps: + - name: Setup main environment + if: github.ref == 'refs/heads/master' + run: echo "ALTERWARE_INSTALLER_PATH=${{ secrets.ALTERWARE_INSTALLER_SSH_PATH }}" >> $GITHUB_ENV + + - name: Download Release binaries + uses: actions/download-artifact@main + with: + name: linux-x64-release + + - name: Install SSH key + uses: shimataro/ssh-key-action@v2.6.1 + with: + key: ${{ secrets.ALTERWARE_MASTER_SSH_PRIVATE_KEY }} + known_hosts: 'just-a-placeholder-so-we-dont-get-errors' + + - name: Add known hosts + run: ssh-keyscan -H ${{ secrets.ALTERWARE_MASTER_SSH_ADDRESS }} >> ~/.ssh/known_hosts + + - name: Upload release binary + run: rsync -avz aw-installer ${{ secrets.ALTERWARE_MASTER_SSH_USER }}@${{ secrets.ALTERWARE_MASTER_SSH_ADDRESS }}:${{ env.ALTERWARE_INSTALLER_PATH }}/