2
2
name : ' Build Dotnet'
3
3
description : ' Builds and deploys the source'
4
4
inputs :
5
+ # General
6
+ PRODUCTION_BUILD :
7
+ description : ' Whether to build a production build'
8
+ required : true
9
+
5
10
# NUGET
6
11
NUGET_PACK :
7
12
description : ' Whether to pack packages with feeds'
@@ -85,10 +90,10 @@ runs:
85
90
DOTNET_TC_QuickJitForLoops : " 1"
86
91
DOTNET_TieredPGO : " 1"
87
92
88
- - name : " Dotnet: Build"
93
+ - name : " Dotnet: Build (Non-Release) "
89
94
working-directory : ${{github.workspace}}/src
90
95
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}}
92
97
env :
93
98
ReleaseNotes : ${{inputs.RELEASE_NOTES}}
94
99
DOTNET_ROOT : " ${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}"
@@ -104,7 +109,7 @@ runs:
104
109
- name : " Dotnet: Test"
105
110
working-directory : ${{github.workspace}}/src
106
111
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
108
113
env :
109
114
ReleaseNotes : ${{inputs.RELEASE_NOTES}}
110
115
DOTNET_ROOT : " ${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}"
@@ -134,6 +139,7 @@ runs:
134
139
if : inputs.OCTOPUS_DEPLOY_PACKAGE != ''
135
140
uses : ./.github/actions/dotnet-publish
136
141
with :
142
+ PRODUCTION_BUILD : ${{inputs.PRODUCTION_BUILD}}
137
143
BUILD_VERSION : ${{inputs.BUILD_VERSION}}
138
144
RELEASE_NOTES : ${{inputs.RELEASE_NOTES}}
139
145
PLATFORM : " win-x64"
@@ -144,6 +150,7 @@ runs:
144
150
if : inputs.OCTOPUS_DEPLOY_PACKAGE != ''
145
151
uses : ./.github/actions/dotnet-publish
146
152
with :
153
+ PRODUCTION_BUILD : ${{inputs.PRODUCTION_BUILD}}
147
154
BUILD_VERSION : ${{inputs.BUILD_VERSION}}
148
155
RELEASE_NOTES : ${{inputs.RELEASE_NOTES}}
149
156
PLATFORM : " linux-x64"
@@ -154,6 +161,7 @@ runs:
154
161
if : inputs.OCTOPUS_DEPLOY_PACKAGE != ''
155
162
uses : ./.github/actions/dotnet-publish
156
163
with :
164
+ PRODUCTION_BUILD : ${{inputs.PRODUCTION_BUILD}}
157
165
BUILD_VERSION : ${{inputs.BUILD_VERSION}}
158
166
RELEASE_NOTES : ${{inputs.RELEASE_NOTES}}
159
167
PLATFORM : " linux-arm64"
@@ -167,7 +175,7 @@ runs:
167
175
if : inputs.NUGET_PACK == 'true'
168
176
working-directory : ${{github.workspace}}/src
169
177
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
171
179
env :
172
180
ReleaseNotes : ${{inputs.RELEASE_NOTES}}
173
181
DOTNET_ROOT : " ${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}"
0 commit comments