Skip to content

Commit

Permalink
Added deployment. (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrueger authored Aug 3, 2023
2 parents b0ab9a6 + 46022ad commit 616ed77
Showing 1 changed file with 46 additions and 5 deletions.
51 changes: 46 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Build
on:
push:
branches: [ "main" ]
workflow_run:
workflows: ["Run Tests"]
branches: [main]
types:
- completed
env:
CARGO_TERM_COLOR: always
jobs:
Expand All @@ -24,7 +27,19 @@ jobs:
with:
name: game_cheetah_linux
path: target/release/bundle/deb/game_cheetah_*.deb

- uses: actions/download-artifact@v3
with:
name: game_cheetah_linux
path: distfiles
- name: Copy file to server
uses: appleboy/scp-action@v0.1.4
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
source: distfiles/*
target: game_cheetah
build_osx:
runs-on: macos-latest
steps:
Expand All @@ -39,7 +54,20 @@ jobs:
with:
name: game_cheetah_osx
path: target/release/game_cheetah

- uses: actions/download-artifact@v3
with:
name: game_cheetah_osx
path: distfiles
- name: Copy file to server
uses: appleboy/scp-action@v0.1.4
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
source: distfiles/*
target: game_cheetah

build_windows:
runs-on: windows-latest
steps:
Expand All @@ -54,4 +82,17 @@ jobs:
with:
name: game_cheetah_windows
path: target/release/game_cheetah.exe

- uses: actions/download-artifact@v3
with:
name: game_cheetah_windows
path: distfiles
- name: Copy file to server
uses: appleboy/scp-action@v0.1.4
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
source: distfiles/*
target: game_cheetah

0 comments on commit 616ed77

Please sign in to comment.