Skip to content

Merge pull request #215 from WiseTechGlobal/yaakov/372 #257

Merge pull request #215 from WiseTechGlobal/yaakov/372

Merge pull request #215 from WiseTechGlobal/yaakov/372 #257

Workflow file for this run

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.100
- name: Workaround for https://github.com/dotnet/core/issues/5881
run: dotnet nuget locals all --clear
- 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.100
- name: Workaround for https://github.com/dotnet/core/issues/5881
run: dotnet nuget locals all --clear
- 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'