2020 TEST_PROJECT : TeamTools.TSQL.LinterTests
2121 PUBLISH_PROJECT_PATH : TeamTools.TSQL.Linter/TeamTools.TSQL.Linter.csproj
2222 OUTPUT_PATH : ${{ github.workspace }}/.bin/
23- PUBLISH_PATH : ${{ github.workspace }}/.pub/
23+ PUBLISH_PATH : ${{ github.workspace }}/.pub
24+ NUPKG_PATH : ${{ github.workspace }}\.nupkgs
2425
2526jobs :
2627 semver :
8990 run : dotnet --info
9091
9192 - name : Cache NuGet packages
93+ id : cache-nugets
9294 uses : actions/cache@v4
9395 with :
9496 path : ${{ github.workspace }}/packages
@@ -143,33 +145,77 @@ jobs:
143145 -p:BaseOutputPath="${{ env.OUTPUT_PATH }}"
144146 -p:PublishDir="${{ env.PUBLISH_PATH }}/Release/net8.0"
145147
148+ - name : Pack
149+ if : ${{ matrix.publish }}
150+ run : >
151+ dotnet pack "${{ github.workspace}}\TeamTools.TSQL.Common\TeamTools.Common.Linting.csproj"
152+ --no-build
153+ --output "${{ env.NUPKG_PATH }}"
154+ -p:Configuration=Release
155+ -p:BaseOutputPath="${{ env.OUTPUT_PATH }}"
156+ -p:VersionPrefix=${{ needs.semver.outputs.next-version }}
157+ &&
158+ dotnet pack "${{ github.workspace}}\TeamTools.TSQL.ExpressionEvaluator\TeamTools.TSQL.ExpressionEvaluator.csproj"
159+ --no-build
160+ --output "${{ env.NUPKG_PATH }}"
161+ -p:Configuration=Release
162+ -p:BaseOutputPath="${{ env.OUTPUT_PATH }}"
163+ -p:VersionPrefix=${{ needs.semver.outputs.next-version }}
164+ &&
165+ dotnet pack "${{ env.PUBLISH_PROJECT_PATH }}"
166+ --no-build
167+ --output "${{ env.NUPKG_PATH }}"
168+ -p:Configuration=Release
169+ -p:BaseOutputPath="${{ env.OUTPUT_PATH }}"
170+ -p:VersionPrefix=${{ needs.semver.outputs.next-version }}
171+ -p:Authors="Ivan Starostin et al"
172+ -p:Copyright="2019- (c) Ivan Starostin"
173+ -p:RepositoryCommit=${{ github.sha }}
174+ -p:RepositoryUrl="${{ github.repositoryUrl }}"
175+ -p:RepositoryType=git
176+ -p:RepositoryBranch="${{ github.ref_name }}"
177+
146178 - name : Upload build artifacts 2.0
147179 uses : actions/upload-artifact@v4
148180 if : ${{ matrix.publish }}
149181 with :
150182 name : ${{ env.PRODUCT_NAME }}-${{ needs.semver.outputs.next-version }}-${{ matrix.configuration }}-netstandard2.0
151183 path : ${{ env.PUBLISH_PATH }}/${{ matrix.configuration }}/netstandard2.0
184+ if-no-files-found : error
152185
153186 - name : Upload build artifacts 6.0
154187 uses : actions/upload-artifact@v4
155188 if : ${{ matrix.publish }}
156189 with :
157190 name : ${{ env.PRODUCT_NAME }}-${{ needs.semver.outputs.next-version }}-${{ matrix.configuration }}-net6.0
158191 path : ${{ env.PUBLISH_PATH }}/${{ matrix.configuration }}/net6.0
192+ if-no-files-found : error
159193
160194 - name : Upload build artifacts 8.0
161195 uses : actions/upload-artifact@v4
162196 if : ${{ matrix.publish }}
163197 with :
164198 name : ${{ env.PRODUCT_NAME }}-${{ needs.semver.outputs.next-version }}-${{ matrix.configuration }}-net8.0
165199 path : ${{ env.PUBLISH_PATH }}/${{ matrix.configuration }}/net8.0
200+ if-no-files-found : error
201+
202+ - name : Upload nugets
203+ uses : actions/upload-artifact@v4
204+ if : ${{ matrix.publish }}
205+ with :
206+ name : nuget-packages
207+ include-hidden-files : true
208+ if-no-files-found : error
209+ path : |
210+ ${{ env.NUPKG_PATH }}\*.nupkg
166211
167212 - name : Upload test bundle
168213 uses : actions/upload-artifact@v4
169214 if : ${{ matrix.configuration == 'Debug' && matrix.os == 'windows-latest' && steps.build.conclusion == 'success' && !cancelled() }}
170215 with :
171216 name : test-bundle
172- path : ${{ env.OUTPUT_PATH }}/${{ matrix.configuration }}/net8.0
217+ path : ${{ env.OUTPUT_PATH }}${{ matrix.configuration }}/net8.0
218+ if-no-files-found : error
173219
174220 - name : Test
175221 if : ${{ !matrix.coverage }}
@@ -194,6 +240,7 @@ jobs:
194240 with :
195241 name : test-results
196242 path : TestResults
243+ if-no-files-found : error
197244
198245 - name : Test Report
199246 uses : dorny/test-reporter@v2
@@ -202,6 +249,7 @@ jobs:
202249 name : NUnit testing ${{ matrix.configuration }} build on ${{ matrix.os }}
203250 path : " **/TestResults/*.trx,*.trx"
204251 reporter : dotnet-trx
252+ if-no-files-found : error
205253
206254 validate-markdown :
207255 runs-on : ubuntu-latest
0 commit comments