Created
January 10, 2021 22:16
-
-
Save AlexZeitler/f73178d8523cf846845c0fe0e4d2e525 to your computer and use it in GitHub Desktop.
.NET Core GitHub Action Template
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: .NET Core Build with Tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
# use ubuntu for more build minutes | |
runs-on: ubuntu-latest | |
# use release mode for all steps | |
env: | |
config: 'Release' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 3.1.101 | |
# restore dependencies | |
- name: Install dependencies | |
run: | | |
cd src | |
dotnet restore | |
# build project | |
- name: Build | |
run: | | |
cd src | |
dotnet build --configuration $config --no-restore | |
- name: Test | |
run: | | |
cd src | |
dotnet test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment