diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-desktop.yml new file mode 100644 index 0000000..fea4d53 --- /dev/null +++ b/.github/workflows/dotnet-desktop.yml @@ -0,0 +1,41 @@ +name: .NET Build and Publish + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + strategy: + matrix: + os: [windows-latest, ubuntu-latest, macos-latest] + configuration: [Debug, Release] + + runs-on: ${{ matrix.os }} + + env: + Solution_Name: SmallRuleAI.sln + Project_Path: src/SRA.csproj + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Restore dependencies + run: dotnet restore ${{ env.Solution_Name }} + + - name: Build + run: dotnet build ${{ env.Solution_Name }} --configuration ${{ matrix.configuration }} --no-restore + + - name: Test + run: dotnet test ${{ env.Solution_Name }} --configuration ${{ matrix.configuration }} --no-build --verbosity normal