Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ env:
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1"
DOTNET_NOLOGO: "true"
SOLUTION_PATH: ./src/AzureEventGridSimulator.sln
PROJECT_PATH: ./src/AzureEventGridSimulator/AzureEventGridSimulator.csproj
# Build specific projects, not the solution (excludes Aspire projects from release)
MAIN_PROJECT: ./src/AzureEventGridSimulator/AzureEventGridSimulator.csproj
TEST_PROJECT: ./src/AzureEventGridSimulator.Tests/AzureEventGridSimulator.Tests.csproj
CONFIGURATION: Release
ARTIFACT_PATH: ./dist

Expand Down Expand Up @@ -56,11 +57,13 @@ jobs:
cache-dependency-path: "**/*.csproj"

- name: Restore dependencies
run: dotnet restore ${{ env.SOLUTION_PATH }} --runtime ${{ matrix.runtime }}
run: |
dotnet restore ${{ env.MAIN_PROJECT }} --runtime ${{ matrix.runtime }}
dotnet restore ${{ env.TEST_PROJECT }} --runtime ${{ matrix.runtime }}

- name: Build
- name: Build main project
run: >-
dotnet build ${{ env.SOLUTION_PATH }}
dotnet build ${{ env.MAIN_PROJECT }}
--configuration ${{ env.CONFIGURATION }}
--framework net10.0
--runtime ${{ matrix.runtime }}
Expand All @@ -70,9 +73,20 @@ jobs:
/p:WarningLevel=4
/p:TreatWarningsAsErrors=true

- name: Build test project
run: >-
dotnet build ${{ env.TEST_PROJECT }}
--configuration ${{ env.CONFIGURATION }}
--framework net10.0
--runtime ${{ matrix.runtime }}
--no-restore
--no-incremental
/p:WarningLevel=4
/p:TreatWarningsAsErrors=true

- name: Test
run: >-
dotnet test ${{ env.SOLUTION_PATH }}
dotnet test ${{ env.TEST_PROJECT }}
--configuration ${{ env.CONFIGURATION }}
--framework net10.0
--runtime ${{ matrix.runtime }}
Expand All @@ -82,7 +96,7 @@ jobs:

- name: Publish
run: >-
dotnet publish ${{ env.PROJECT_PATH }}
dotnet publish ${{ env.MAIN_PROJECT }}
--configuration ${{ env.CONFIGURATION }}
--framework net10.0
--runtime ${{ matrix.runtime }}
Expand Down
Loading