Skip to content

Commit 84b41dd

Browse files
authored
fix: release (#247)
mistakes were made
1 parent 0afc557 commit 84b41dd

1 file changed

Lines changed: 21 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ env:
2424
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
2525
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1"
2626
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
2930
CONFIGURATION: Release
3031
ARTIFACT_PATH: ./dist
3132

@@ -56,11 +57,13 @@ jobs:
5657
cache-dependency-path: "**/*.csproj"
5758

5859
- 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 }}
6063
61-
- name: Build
64+
- name: Build main project
6265
run: >-
63-
dotnet build ${{ env.SOLUTION_PATH }}
66+
dotnet build ${{ env.MAIN_PROJECT }}
6467
--configuration ${{ env.CONFIGURATION }}
6568
--framework net10.0
6669
--runtime ${{ matrix.runtime }}
@@ -70,9 +73,20 @@ jobs:
7073
/p:WarningLevel=4
7174
/p:TreatWarningsAsErrors=true
7275
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+
7387
- name: Test
7488
run: >-
75-
dotnet test ${{ env.SOLUTION_PATH }}
89+
dotnet test ${{ env.TEST_PROJECT }}
7690
--configuration ${{ env.CONFIGURATION }}
7791
--framework net10.0
7892
--runtime ${{ matrix.runtime }}
@@ -82,7 +96,7 @@ jobs:
8296
8397
- name: Publish
8498
run: >-
85-
dotnet publish ${{ env.PROJECT_PATH }}
99+
dotnet publish ${{ env.MAIN_PROJECT }}
86100
--configuration ${{ env.CONFIGURATION }}
87101
--framework net10.0
88102
--runtime ${{ matrix.runtime }}

0 commit comments

Comments
 (0)