Bump actions/setup-dotnet from 4 to 5 (#55) #21
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
# .NET Build and Test Workflow | |
name: Build and Test | |
permissions: | |
contents: read | |
pull-requests: write | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
env: | |
HUSKY: 0 # don't run husky.net hooks | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup .NET SDKs | |
uses: actions/setup-dotnet@v5 | |
with: | |
# .net 4.8.x is included by default in windows-latest | |
dotnet-version: | | |
8.0.x | |
9.0.x | |
- name: Restore .NET tools | |
run: dotnet tool restore | |
working-directory: . | |
- name: Restore dependencies | |
run: dotnet restore | |
working-directory: ./src | |
- name: Build | |
run: dotnet build ./src --no-restore -p:VersionFromCI="0.0.0-cibuild" | |
- name: Test | |
run: dotnet test ./src --no-build --verbosity normal |