Skip to content

Commit 5699912

Browse files
committed
[Dependencies] - Update .github/actions/dotnet/action.yml to match the template repo
1 parent 573c932 commit 5699912

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/actions/dotnet/action.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
name: 'Build Dotnet'
33
description: 'Builds and deploys the source'
44
inputs:
5+
# General
6+
PRODUCTION_BUILD:
7+
description: 'Whether to build a production build'
8+
required: true
9+
510
# NUGET
611
NUGET_PACK:
712
description: 'Whether to pack packages with feeds'
@@ -85,10 +90,10 @@ runs:
8590
DOTNET_TC_QuickJitForLoops: "1"
8691
DOTNET_TieredPGO: "1"
8792

88-
- name: "Dotnet: Build"
93+
- name: "Dotnet: Build (Non-Release)"
8994
working-directory: ${{github.workspace}}/src
9095
shell: bash
91-
run: dotnet build --configuration Release "/p:Version=${{inputs.BUILD_VERSION}}" "/p:EnableSarif=True" -nodeReuse:False -p:NoWarn=MSB4241 -p:SuppressNETCoreSdkPreviewMessage=true ${{env.DOTNET_RELEASE_DEFINES}}
96+
run: dotnet build --configuration Release "/p:Version=${{inputs.BUILD_VERSION}}" "/p:EnableSarif=True" "/p:IsProduction=${{inputs.PRODUCTION_BUILD}}" -nodeReuse:False -p:NoWarn=MSB4241 -p:SuppressNETCoreSdkPreviewMessage=true ${{env.DOTNET_RELEASE_DEFINES}}
9297
env:
9398
ReleaseNotes: ${{inputs.RELEASE_NOTES}}
9499
DOTNET_ROOT: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}"
@@ -104,7 +109,7 @@ runs:
104109
- name: "Dotnet: Test"
105110
working-directory: ${{github.workspace}}/src
106111
shell: bash
107-
run: dotnet test --no-build --no-restore -noConsoleLogger --configuration Release "/p:Version=${{inputs.BUILD_VERSION}}" --filter FullyQualifiedName\!~Integration --logger:"trx;LogFilePrefix=testResults" --results-directory ../test-results -nodeReuse:False -p:NoWarn=MSB4241 -p:SuppressNETCoreSdkPreviewMessage=true
112+
run: dotnet test --no-build --no-restore -noConsoleLogger --configuration Release "/p:Version=${{inputs.BUILD_VERSION}}" "/p:IsProduction=${{inputs.PRODUCTION_BUILD}}" --filter FullyQualifiedName\!~Integration --logger:"trx;LogFilePrefix=testResults" --results-directory ../test-results -nodeReuse:False -p:NoWarn=MSB4241 -p:SuppressNETCoreSdkPreviewMessage=true
108113
env:
109114
ReleaseNotes: ${{inputs.RELEASE_NOTES}}
110115
DOTNET_ROOT: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}"
@@ -134,6 +139,7 @@ runs:
134139
if: inputs.OCTOPUS_DEPLOY_PACKAGE != ''
135140
uses: ./.github/actions/dotnet-publish
136141
with:
142+
PRODUCTION_BUILD: ${{inputs.PRODUCTION_BUILD}}
137143
BUILD_VERSION: ${{inputs.BUILD_VERSION}}
138144
RELEASE_NOTES: ${{inputs.RELEASE_NOTES}}
139145
PLATFORM: "win-x64"
@@ -144,6 +150,7 @@ runs:
144150
if: inputs.OCTOPUS_DEPLOY_PACKAGE != ''
145151
uses: ./.github/actions/dotnet-publish
146152
with:
153+
PRODUCTION_BUILD: ${{inputs.PRODUCTION_BUILD}}
147154
BUILD_VERSION: ${{inputs.BUILD_VERSION}}
148155
RELEASE_NOTES: ${{inputs.RELEASE_NOTES}}
149156
PLATFORM: "linux-x64"
@@ -154,6 +161,7 @@ runs:
154161
if: inputs.OCTOPUS_DEPLOY_PACKAGE != ''
155162
uses: ./.github/actions/dotnet-publish
156163
with:
164+
PRODUCTION_BUILD: ${{inputs.PRODUCTION_BUILD}}
157165
BUILD_VERSION: ${{inputs.BUILD_VERSION}}
158166
RELEASE_NOTES: ${{inputs.RELEASE_NOTES}}
159167
PLATFORM: "linux-arm64"
@@ -167,7 +175,7 @@ runs:
167175
if: inputs.NUGET_PACK == 'true'
168176
working-directory: ${{github.workspace}}/src
169177
shell: bash
170-
run: dotnet pack --configuration Release "/p:Version=${{inputs.BUILD_VERSION}}" --no-restore -nodeReuse:False -p:NoWarn=MSB4241
178+
run: dotnet pack --configuration Release "/p:Version=${{inputs.BUILD_VERSION}}" "/p:IsProduction=${{inputs.PRODUCTION_BUILD}}" --no-restore -nodeReuse:False -p:NoWarn=MSB4241
171179
env:
172180
ReleaseNotes: ${{inputs.RELEASE_NOTES}}
173181
DOTNET_ROOT: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}"

0 commit comments

Comments
 (0)