Skip to content

Commit 5a9d65d

Browse files
authored
Update ci.yml
1 parent 12bbe20 commit 5a9d65d

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ env:
1313
PRODUCT_NAME: TeamTools.Linter.CommandLine
1414
TEST_PROJECT: TeamTools.Linter.CommandLineTests
1515
OUTPUT_PATH: ${{ github.workspace }}/.bin/
16+
PUBLISH_PATH: ${{ github.workspace }}/.pub/
1617

1718
jobs:
1819
semver:
@@ -89,7 +90,6 @@ jobs:
8990
--configuration ${{ matrix.configuration }}
9091
-p:VersionPrefix=${{ needs.semver.outputs.next-version }}
9192
-p:ContinuousIntegrationBuild=true
92-
-p:${{ env.TEST_PROJECT }}.OutputPath="${{ env.OUTPUT_PATH }}Tests/${{ matrix.configuration }}/"
9393
-p:SourceRevisionId=${{ github.sha }}
9494
-p:RepositoryUrl="${{ github.repositoryUrl }}"
9595
-p:RepositoryType=git
@@ -101,7 +101,6 @@ jobs:
101101
run: >
102102
dotnet test --no-build --verbosity normal
103103
-p:BaseOutputPath="${{ env.OUTPUT_PATH }}"
104-
-p:${{ env.TEST_PROJECT }}.OutputPath="${{ env.OUTPUT_PATH }}Tests/${{ matrix.configuration }}/"
105104
--configuration ${{ matrix.configuration }}
106105
--logger "trx;LogFileName=${{ github.workspace }}/TestResults/test-results.trx"
107106
@@ -111,7 +110,6 @@ jobs:
111110
dotnet test --no-build --verbosity normal
112111
-p:CollectCoverage=true -p:CoverletOutput="${{ github.workspace }}/TestResults/" -p:CoverletOutputFormat=opencover /p:ExcludeByFile="**/TeamTools.TSQL.Common/**/*.cs"
113112
-p:BaseOutputPath="${{ env.OUTPUT_PATH }}"
114-
-p:${{ env.TEST_PROJECT }}.OutputPath="${{ env.OUTPUT_PATH }}Tests/${{ matrix.configuration }}/"
115113
--configuration ${{ matrix.configuration }}
116114
--logger "trx;LogFileName=${{ github.workspace }}/TestResults/test-results.trx"
117115
@@ -121,6 +119,18 @@ jobs:
121119
with:
122120
name: test-results
123121
path: TestResults
122+
123+
- name: Prepare package
124+
if: ${{ matrix.configuration == 'Release' }}
125+
run: >
126+
dotnet publish --no-build --verbosity normal
127+
--configuration ${{ matrix.configuration }}
128+
-p:PublishDir=${{ env.PUBLISH_PATH }}
129+
130+
- name: list
131+
run: |
132+
cd ${{ env.PUBLISH_PATH }}
133+
ls
124134
125135
- name: Test Report
126136
uses: dorny/test-reporter@v2
@@ -135,21 +145,21 @@ jobs:
135145
if: ${{ matrix.configuration == 'Release' && matrix.os == 'windows-latest' && steps.build.conclusion == 'success' }}
136146
with:
137147
name: ${{ env.PRODUCT_NAME }}-${{ needs.semver.outputs.next-version }}-${{ matrix.configuration }}-netcoreapp3.1
138-
path: ${{ env.OUTPUT_PATH }}/${{ matrix.configuration }}/netcoreapp3.1
148+
path: ${{ env.PUBLISH_PATH }}/${{ matrix.configuration }}/netcoreapp3.1
139149

140150
- name: Upload build artifacts 6.0
141151
uses: actions/upload-artifact@v4
142152
if: ${{ matrix.configuration == 'Release' && matrix.os == 'windows-latest' && steps.build.conclusion == 'success' }}
143153
with:
144154
name: ${{ env.PRODUCT_NAME }}-${{ needs.semver.outputs.next-version }}-${{ matrix.configuration }}-net6.0
145-
path: ${{ env.OUTPUT_PATH }}/${{ matrix.configuration }}/net6.0
155+
path: ${{ env.PUBLISH_PATH }}/${{ matrix.configuration }}/net6.0
146156

147157
- name: Upload build artifacts 8.0
148158
uses: actions/upload-artifact@v4
149159
if: ${{ matrix.configuration == 'Release' && matrix.os == 'windows-latest' && steps.build.conclusion == 'success' }}
150160
with:
151161
name: ${{ env.PRODUCT_NAME }}-${{ needs.semver.outputs.next-version }}-${{ matrix.configuration }}-net8.0
152-
path: ${{ env.OUTPUT_PATH }}/${{ matrix.configuration }}/net8.0
162+
path: ${{ env.PUBLISH_PATH }}/${{ matrix.configuration }}/net8.0
153163

154164
report:
155165
needs: build

0 commit comments

Comments
 (0)