build: deploy release binary
This commit is contained in:
parent
b038ebf661
commit
1361cd502b
30
.github/workflows/build.yml
vendored
30
.github/workflows/build.yml
vendored
@ -160,3 +160,33 @@ jobs:
|
|||||||
name: macos-${{matrix.arch}}-${{matrix.configuration}}
|
name: macos-${{matrix.arch}}-${{matrix.configuration}}
|
||||||
path: |
|
path: |
|
||||||
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master
|
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master
|
||||||
|
|
||||||
|
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_MASTER_SERVER_PATH=${{ secrets.ALTERWARE_MASTER_SERVER_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_SERVER_SSH_PRIVATE_KEY }}
|
||||||
|
known_hosts: 'just-a-placeholder-so-we-dont-get-errors'
|
||||||
|
|
||||||
|
- name: Add known hosts
|
||||||
|
run: ssh-keyscan -H ${{ secrets.ALTERWARE_MASTER_SERVER_SSH_ADDRESS }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
|
- name: Upload release binary
|
||||||
|
run: rsync -avz alterware-master ${{ secrets.ALTERWARE_MASTER_SERVER_SSH_USER }}@${{ secrets.ALTERWARE_MASTER_SERVER_SSH_ADDRESS }}:${{ env.ALTERWARE_MASTER_SERVER_PATH }}/
|
||||||
|
|
||||||
|
- name: Publish changes
|
||||||
|
run: ssh ${{ secrets.ALTERWARE_MASTER_SERVER_SSH_USER }}@${{ secrets.ALTERWARE_MASTER_SERVER_SSH_ADDRESS }} ${{ secrets.ALTERWARE_SSH_SERVER_PUBLISH_COMMAND }}
|
||||||
|
Loading…
Reference in New Issue
Block a user