Merge pull request #259 from joakimskoog/deploy-workflow #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '*.md' | |
jobs: | |
build-job: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Build | |
run: dotnet build -c Release | |
- name: Tests | |
run: dotnet test tests/AnApiOfIceAndFire.Tests/AnApiOfIceAndFire.Tests.csproj -c Release --logger GitHubActions | |
deploy-job: | |
name: Deploy | |
if: github.ref == 'refs/heads/master' | |
needs: build-job | |
runs-on: ubuntu-latest | |
steps: | |
- name: Publish | |
run: dotnet publish -c Release |