|
24 | 24 | DOTNET_CLI_TELEMETRY_OPTOUT: "1" |
25 | 25 | DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1" |
26 | 26 | DOTNET_NOLOGO: "true" |
27 | | - SOLUTION_PATH: ./src/AzureEventGridSimulator.sln |
28 | | - PROJECT_PATH: ./src/AzureEventGridSimulator/AzureEventGridSimulator.csproj |
| 27 | + # Build specific projects, not the solution (excludes Aspire projects from release) |
| 28 | + MAIN_PROJECT: ./src/AzureEventGridSimulator/AzureEventGridSimulator.csproj |
| 29 | + TEST_PROJECT: ./src/AzureEventGridSimulator.Tests/AzureEventGridSimulator.Tests.csproj |
29 | 30 | CONFIGURATION: Release |
30 | 31 | ARTIFACT_PATH: ./dist |
31 | 32 |
|
@@ -56,11 +57,13 @@ jobs: |
56 | 57 | cache-dependency-path: "**/*.csproj" |
57 | 58 |
|
58 | 59 | - name: Restore dependencies |
59 | | - run: dotnet restore ${{ env.SOLUTION_PATH }} --runtime ${{ matrix.runtime }} |
| 60 | + run: | |
| 61 | + dotnet restore ${{ env.MAIN_PROJECT }} --runtime ${{ matrix.runtime }} |
| 62 | + dotnet restore ${{ env.TEST_PROJECT }} --runtime ${{ matrix.runtime }} |
60 | 63 |
|
61 | | - - name: Build |
| 64 | + - name: Build main project |
62 | 65 | run: >- |
63 | | - dotnet build ${{ env.SOLUTION_PATH }} |
| 66 | + dotnet build ${{ env.MAIN_PROJECT }} |
64 | 67 | --configuration ${{ env.CONFIGURATION }} |
65 | 68 | --framework net10.0 |
66 | 69 | --runtime ${{ matrix.runtime }} |
|
70 | 73 | /p:WarningLevel=4 |
71 | 74 | /p:TreatWarningsAsErrors=true |
72 | 75 |
|
| 76 | + - name: Build test project |
| 77 | + run: >- |
| 78 | + dotnet build ${{ env.TEST_PROJECT }} |
| 79 | + --configuration ${{ env.CONFIGURATION }} |
| 80 | + --framework net10.0 |
| 81 | + --runtime ${{ matrix.runtime }} |
| 82 | + --no-restore |
| 83 | + --no-incremental |
| 84 | + /p:WarningLevel=4 |
| 85 | + /p:TreatWarningsAsErrors=true |
| 86 | +
|
73 | 87 | - name: Test |
74 | 88 | run: >- |
75 | | - dotnet test ${{ env.SOLUTION_PATH }} |
| 89 | + dotnet test ${{ env.TEST_PROJECT }} |
76 | 90 | --configuration ${{ env.CONFIGURATION }} |
77 | 91 | --framework net10.0 |
78 | 92 | --runtime ${{ matrix.runtime }} |
|
82 | 96 |
|
83 | 97 | - name: Publish |
84 | 98 | run: >- |
85 | | - dotnet publish ${{ env.PROJECT_PATH }} |
| 99 | + dotnet publish ${{ env.MAIN_PROJECT }} |
86 | 100 | --configuration ${{ env.CONFIGURATION }} |
87 | 101 | --framework net10.0 |
88 | 102 | --runtime ${{ matrix.runtime }} |
|
0 commit comments