Skip to content

Commit

Permalink
Add GitHub Actions CI
Browse files Browse the repository at this point in the history
  • Loading branch information
azeier committed Apr 3, 2020
1 parent 9dbe46e commit 08814c3
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build & Deploy

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2

- name: Setup MSBuild
uses: microsoft/[email protected]

- name: Setup VSTest
uses: darenm/Setup-VSTest@v1

- name: Setup NuGet
uses: NuGet/[email protected]

- name: Restore packages
run: nuget restore ./HearthDb.sln

- name: Build
run: msbuild ./HearthDb.sln /p:Configuration=Release

- name: Run Tests
run: vstest.console "./HearthDb.Tests/bin/Release/HearthDb.Tests.dll"

- name: Upload artifact
if: github.event_name == 'push'
uses: actions/[email protected]
with:
name: HearthDb.dll
path: "./HearthDb/bin/Release/HearthDb.dll"

deploy:
needs: build
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: HearthDb.dll
path: bin

- name: Deploy
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "us-east-1"
SOURCE_DIR: "bin"
DEST_DIR: "hdt"

0 comments on commit 08814c3

Please sign in to comment.