diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 3850d95b..d3e47a74 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -1,7 +1,7 @@ name: Tophat workflow on: [push] jobs: - MakePkg-Msbuild: + windows_build: runs-on: windows-latest steps: - uses: actions/checkout@v2 @@ -11,3 +11,28 @@ jobs: git submodule init git submodule update --remote ./msbuild.bat + + linux_build: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Install SSH + run: apt install -y openssh-client + - name: Install SSH key + uses: shimataro/ssh-key-action@v2.6.1 + with: + key: ${{ secrets.SSH_KEY }} + - name: Update submodules + run: | + git submodule init + git submodule update --remote + - name: Build linux + run: make + - name: Build windows + run: make cross + - name: Deploy + run: | + rsync --rsh="ssh -o StrictHostKeyChecking=no" tophat marek@tophat2d.dev:www/tophat-web/dl/tophat-linux + rsync --rsh="ssh -o StrictHostKeyChecking=no" tophat.exe marek@tophat2d.dev:www/tophat-web/dl/tophat-windows.exe + - name: On push script + ssh -o 'StrictHostKeyChecking no' marek@tophat2d.dev /home/marek/on-tophat-push