Bump actions/setup-dotnet from 4 to 5 (#2) #13
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-test: | |
| name: Build & test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up .NET (8, 9, 10) | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| 10.0.x | |
| - name: Restore | |
| run: dotnet restore | |
| - name: Build (Release, warnings as errors) | |
| run: dotnet build -c Release --no-restore | |
| - name: Verify formatting | |
| run: dotnet format --verify-no-changes --no-restore | |
| - name: Test (net8.0, net9.0, net10.0) with coverage | |
| run: dotnet test -c Release --no-build --collect:"XPlat Code Coverage" --results-directory ./coverage | |
| - name: Upload coverage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage | |
| path: ./coverage/**/coverage.cobertura.xml | |
| if-no-files-found: warn | |
| package-sbom: | |
| name: Pack & SBOM | |
| runs-on: ubuntu-latest | |
| needs: build-test | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up .NET (8, 9, 10) | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| 10.0.x | |
| - name: Pack (deterministic, with symbols) | |
| run: dotnet pack src/PostQuantum.EntityFrameworkCore/PostQuantum.EntityFrameworkCore.csproj -c Release -o artifacts | |
| - name: Generate SBOM (CycloneDX) | |
| run: ./scripts/generate-sbom.sh | |
| - name: Upload package + SBOM | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nuget-and-sbom | |
| path: | | |
| artifacts/*.nupkg | |
| artifacts/*.snupkg | |
| sbom/*.cdx.json | |
| if-no-files-found: error |