Remove old CI workaround, update .NET 6 SDK #263
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: CI/CD | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
ci: | |
name: Build on ${{ matrix.os }} - ${{ matrix.configuration }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ windows-latest, macos-latest, ubuntu-latest ] | |
configuration: [ Debug, Release ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.0.423 | |
- name: Build WTG.Analyzers | |
run: dotnet build src --configuration ${{ matrix.configuration }} | |
- name: Build NuGet Package | |
run: dotnet pack src --configuration ${{ matrix.configuration }} --no-build -p:CommitID=${{ github.sha }} | |
- name: Run Tests (net472) | |
if: matrix.configuration == 'Debug' && matrix.os == 'windows-latest' | |
run: dotnet test src --no-build --framework net472 | |
- name: Run Tests (net6.0) | |
if: matrix.configuration == 'Debug' | |
run: dotnet test src --no-build --framework net6.0 | |
nupkg: | |
name: Create NuGet Package | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.0.423 | |
- name: Build NuGet Package | |
run: dotnet pack src -p:CommitID=${{ github.sha }} | |
- name: Upload NuGet Package | |
uses: actions/upload-artifact@v2 | |
with: | |
name: nuget-packages | |
path: 'Bin/*.nupkg' |