Last active
September 17, 2020 22:15
-
-
Save tonytins/8bdd366bff80f0e26b8ad2b47745a9c9 to your computer and use it in GitHub Desktop.
Continuous integration for .NET. This assumes everything is in the /src directory.
This file contains hidden or 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 | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
dotnet: ["3.1.200", "3.1.201"] | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: ${{ matrix.dotnet }} | |
- name: Install dependencies | |
run: dotnet restore src | |
- name: Build | |
run: dotnet build src --configuration Release --no-restore |
This file contains hidden or 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 Framework | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup msbuild | |
uses: microsoft/[email protected] | |
- name: Install dependencies | |
run: nuget restore src | |
- name: Build | |
run: msbuild src /verbosity:normal /p:Configuration=Release |
This file contains hidden or 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
dist: xenial | |
addons: | |
snaps: | |
- name: dotnet-sdk | |
classic: true | |
channel: lts/stable | |
sudo: required | |
language: csharp | |
mono: none | |
script: | |
- sudo snap alias dotnet-sdk.dotnet dotnet | |
- dotnet restore src | |
- dotnet build src -c Release --no-restore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment