Update dotnet-desktop.yml #16
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
| name: .NET Core Desktop | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| configuration: [Debug, Release] | |
| runs-on: windows-latest | |
| env: | |
| Solution_Name: RAYTRACER_UNILIGHT.sln | |
| Project_Name: RAYTRACER_UNILIGHT.csproj | |
| CommonRepo_Url: https://github.com/danmunteanu/COMMON_GRAPHICS.git | |
| CommonSolution_Name: COMMON_GRAPHICS.sln | |
| CommonProject_Name: COMMON_GRAPHICS.csproj | |
| steps: | |
| # Checkout main repository | |
| - name: Checkout RAYTRACER_UNILIGHT | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # Checkout COMMON_GRAPHICS into a subfolder | |
| - name: Checkout COMMON_GRAPHICS | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: danmunteanu/COMMON_GRAPHICS | |
| path: COMMON_GRAPHICS | |
| fetch-depth: 0 | |
| # Install .NET SDK | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| # Setup MSBuild | |
| - name: Setup MSBuild.exe | |
| uses: microsoft/setup-msbuild@v2 | |
| # Restore COMMON_GRAPHICS packages | |
| - name: Restore COMMON_GRAPHICS | |
| run: msbuild COMMON_GRAPHICS/$env:CommonSolution_Name /t:Restore /p:Configuration=${{ matrix.configuration }} | |
| # Build COMMON_GRAPHICS | |
| - name: Build COMMON_GRAPHICS | |
| run: msbuild COMMON_GRAPHICS/$env:CommonSolution_Name /p:Configuration=${{ matrix.configuration }} | |
| # Restore RAYTRACER_UNILIGHT packages | |
| - name: Restore RAYTRACER_UNILIGHT | |
| run: msbuild $env:Solution_Name /t:Restore /p:Configuration=${{ matrix.configuration }} | |
| # Build RAYTRACER_UNILIGHT | |
| - name: Build RAYTRACER_UNILIGHT | |
| run: msbuild $env:Solution_Name /p:Configuration=${{ matrix.configuration }} | |
| # Run tests (optional) | |
| # - name: Run tests | |
| # run: dotnet test $env:Solution_Name --configuration ${{ matrix.configuration }} | |
| # continue-on-error: true | |
| # Publish RAYTRACER_UNILIGHT | |
| - name: Publish | |
| run: dotnet publish $env:Project_Name -c ${{ matrix.configuration }} -o publish | |
| # Upload build artifacts | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: RAYTRACER_UNILIGHT_${{ matrix.configuration }} | |
| path: publish/** |