@@ -115,6 +115,43 @@ jobs:
115115 if : ${{ matrix.publish }}
116116 run : |
117117 echo "BUNDLE_STATUS=${{ steps.upload-bundle.conclusion }}" >> $GITHUB_OUTPUT
118+
119+ - name : Prepare publish package per framework
120+ if : ${{ matrix.publish }}
121+ run : >
122+ dotnet publish "${{ env.PUBLISH_PROJECT_PATH }}" --no-build
123+ -p:TargetFramework=netcoreapp3.1
124+ -p:Configuration=${{ matrix.configuration }}
125+ -p:BaseOutputPath="${{ env.OUTPUT_PATH }}"
126+ -p:PublishDir="${{ env.PUBLISH_PATH }}/Release/netcoreapp3.1"
127+ && dotnet publish "${{ env.PUBLISH_PROJECT_PATH }}" --no-build
128+ -p:TargetFramework=net6.0
129+ -p:Configuration=${{ matrix.configuration }}
130+ -p:BaseOutputPath="${{ env.OUTPUT_PATH }}"
131+ -p:PublishDir="${{ env.PUBLISH_PATH }}/Release/net6.0"
132+ && dotnet publish "${{ env.PUBLISH_PROJECT_PATH }}" --no-build
133+ -p:TargetFramework=net8.0
134+ -p:Configuration=${{ matrix.configuration }}
135+ -p:BaseOutputPath="${{ env.OUTPUT_PATH }}"
136+ -p:PublishDir="${{ env.PUBLISH_PATH }}/Release/net8.0"
137+
138+ - name : Upload build for netcoreapp3.1
139+ uses : actions/upload-artifact@v4
140+ with :
141+ name : ${{ env.PRODUCT_NAME }}-${{ needs.semver.outputs.next-version }}-${{ matrix.configuration }}-netcoreapp3.1
142+ path : ${{ env.PUBLISH_PATH }}/${{ matrix.configuration }}/netcoreapp3.1
143+
144+ - name : Upload build for net6.0
145+ uses : actions/upload-artifact@v4
146+ with :
147+ name : ${{ env.PRODUCT_NAME }}-${{ needs.semver.outputs.next-version }}-${{ matrix.configuration }}-net6.0
148+ path : ${{ env.PUBLISH_PATH }}/${{ matrix.configuration }}/net6.0
149+
150+ - name : Upload build for net8.0
151+ uses : actions/upload-artifact@v4
152+ with :
153+ name : ${{ env.PRODUCT_NAME }}-${{ needs.semver.outputs.next-version }}-${{ matrix.configuration }}-net8.0
154+ path : ${{ env.PUBLISH_PATH }}/${{ matrix.configuration }}/net8.0
118155
119156 - name : Test
120157 if : ${{ !matrix.coverage }}
@@ -194,60 +231,11 @@ jobs:
194231 - name : Print code coverage
195232 if : steps.create_coverage_badge.outcome == 'success'
196233 run : echo "Code coverage percentage ${{steps.create_coverage_badge.outputs.percentage}}%"
197-
198- repack-per-framework :
199- name : Repackage per framework
200- if : ${{ always() && needs.build.outputs.build-result == 'success' }}
201- needs : [build, semver]
202- runs-on : windows-latest
203-
204- strategy :
205- fail-fast : false
206- matrix :
207- app-dotnet : [netcoreapp3.1, net6.0, net8.0]
208- configuration : [Release]
209-
210- steps :
211- - uses : actions/checkout@v4
212-
213- - name : Grab bundle
214- id : cli
215- uses : actions/download-artifact@v4
216- with :
217- name : bundle-${{ matrix.configuration }}
218- path : ${{ env.OUTPUT_PATH }}
219-
220-
221- - name : Cache NuGet packages
222- id : cache-nugets
223- uses : actions/cache@v4
224- with :
225- path : ${{ github.workspace }}/packages
226- key : ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json', '**/*.csproj', 'Directory.Build.props') }} # Unique key for the cache
227- restore-keys : |
228- ${{ runner.os }}-nuget-
229-
230- - name : Restore dependencies
231- run : dotnet restore --p:ContinuousIntegrationBuild=true
232-
233- - name : Prepare publish package for
234- if : ${{ matrix.configuration == 'Release' }}
235- run : >
236- dotnet publish "${{ env.PUBLISH_PROJECT_PATH }}" --no-build
237- -p:TargetFramework=${{ matrix.app-dotnet }}
238- -p:Configuration=${{ matrix.configuration }}
239- -p:BaseOutputPath="${{ env.OUTPUT_PATH }}"
240- -p:PublishDir="${{ env.PUBLISH_PATH }}/Release/${{ matrix.app-dotnet }}"
241-
242- - name : Upload build for ${{ matrix.app-dotnet }}
243- uses : actions/upload-artifact@v4
244- with :
245- name : ${{ env.PRODUCT_NAME }}-${{ needs.semver.outputs.next-version }}-${{ matrix.configuration }}-${{ matrix.app-dotnet }}
246- path : ${{ env.PUBLISH_PATH }}/${{ matrix.configuration }}/${{ matrix.app-dotnet }}
247234
248235 repack-with-plugins :
249236 name : Repackage with plugins
250- needs : [semver, repack-per-framework]
237+ needs : [semver, build]
238+ if : ${{ always() && needs.build.outputs.build-result == 'success' }}
251239 runs-on : ubuntu-latest
252240
253241 strategy :
0 commit comments