Skip to content

Updates .NET SDK version to 9.x #16

Updates .NET SDK version to 9.x

Updates .NET SDK version to 9.x #16

name: Build guides sln
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'src/**'
- '.github/workflows/all-guides-sln.yml'
pull_request:
branches: [ main ]
paths:
- 'src/**'
- '.github/workflows/all-guides-sln.yml'
env:
SLN_FILEPATH : ${{github.workspace}}/DotNet.Guides.sln
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 9.x
- name: Clears local NuGet resources
if: matrix.os == 'windows-latest' # required due to bug when using dotnet cli on windows-latest. See https://github.com/dotnet/core/issues/5881 and https://github.com/actions/setup-dotnet/issues/155
shell: pwsh
run: dotnet nuget locals all --clear
- name: Restore dependencies
shell: pwsh
run: dotnet restore ${{env.SLN_FILEPATH}}
- name: Build
shell: pwsh
run: dotnet build ${{env.SLN_FILEPATH}} -c Release --no-restore