Skip to content

Update dotnet-desktop.yml #31

Update dotnet-desktop.yml

Update dotnet-desktop.yml #31

# For more information on GitHub Actions, refer to https://github.com/features/actions
# For a complete CI/CD sample to get started with GitHub Action workflows for Desktop Applications,
# refer to https://github.com/microsoft/github-actions-for-desktop-apps
name: .NET Core Desktop
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
configuration: [Release]
dotnet-version: ['6.x', '7.x', '8.x'] # Specify the desired versions
runs-on: windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
env:
Solution_Name: wpf-material-dialogs.sln
Test_Project_Path: wpf-material-dialogs.test\wpf-material-dialogs.test.csproj
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# Specify the correct .NET version
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet-version }}
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/[email protected]
# Execute all unit tests in the solution
- name: Execute unit tests
run: dotnet test --framework ${{ matrix.dotnet-version }}
# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}