Skip to content

Commit 5496d8b

Browse files
author
Petr Sramek
committed
fixed issues
1 parent 8763635 commit 5496d8b

File tree

2 files changed

+40
-35
lines changed

2 files changed

+40
-35
lines changed

.github/actions/build/action.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ inputs:
1414
required: true
1515
# Optional
1616
dotnet_sdk_version:
17-
description: '.NET SDK version'
17+
description: '.NET SDK version. Default: 9.x'
1818
required: false
19-
default: ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
19+
default: '9.x'
2020
build-configuration:
21-
description: 'Build configuration. Default: vars.DEFAULT_BUILD_CONFIGURATION'
21+
description: 'Build configuration. Default: ''Release'''
2222
required: false
23-
default: ${{ vars.DEFAULT_BUILD_CONFIGURATION }}
23+
default: 'Release'
2424
build-platform:
25-
description: 'Build platform. Deafult: vars.DEFAULT_BUILD_PLATFORM'
25+
description: 'Build platform. Deafult: ''AnyCPU'''
2626
required: false
27-
default: ${{ vars.DEFAULT_BUILD_PLATFORM }}
27+
default: 'AnyCPU'
2828
build-glob-pattern:
29-
description: 'Search pattern for source code. Default: vars.SRC_SEARCH_PATTERN'
29+
description: 'Search pattern for source code. Default: ''**/*.csproj'''
3030
required: false
31-
default: ${{ vars.SRC_SEARCH_PATTERN }}
31+
default: '**/*.csproj'
3232
upload-build-artifacts:
3333
description: 'Upload build artifacts, Default: ''true'''
3434
required: false

.github/workflows/dotnet.yml

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@ concurrency:
2828
env:
2929
is_release: ${{ startsWith(github.ref_name, 'release') || startsWith(github.ref_name, 'preview') }}
3030
is_preview: ${{ startsWith(github.ref_name, 'preview') }}
31+
dotnet-sdk-version: '9.x'
32+
build-configuration: 'Release'
33+
build-platform: 'AnyCPU'
34+
git-version: '6.x'
3135

3236
jobs:
3337
versioning:
34-
name: Versioning with GitVersion ${{ vars.GIT_VERSION }}
38+
name: Versioning with GitVersion ${{ env.git-version }}
3539
runs-on: ubuntu-latest
3640
outputs:
3741
ASSEMBLY_VERSION: ${{ steps.versioning.outputs.ASSEMBLY_VERSION }}
@@ -42,20 +46,20 @@ jobs:
4246
- uses: actions/checkout@v4
4347
with:
4448
fetch-depth: 0
45-
- name: Install GitVersion ${{ vars.GIT_VERSION }}
49+
- name: Install GitVersion ${{ env.git-version }}
4650
uses: gittools/actions/gitversion/setup@v3.1.11
4751
with:
48-
versionSpec: ${{ vars.GIT_VERSION }}
52+
versionSpec: ${{ env.git-version }}
4953
preferLatestVersion: true
50-
- name: Calculate version with GitVersion ${{ vars.GIT_VERSION }}
54+
- name: Calculate version with GitVersion ${{ env.git-version }}
5155
id: gitversion
5256
uses: gittools/actions/gitversion/execute@v3.1.11
5357
with:
5458
useConfigFile: true
5559
configFilePath: ./.gitversion/version.yml
5660

5761
build:
58-
name: Build with .NET ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
62+
name: Build with .NET ${{ env.dotnet-sdk-version }}
5963
needs: [versioning]
6064
runs-on: ubuntu-latest
6165
env:
@@ -69,12 +73,13 @@ jobs:
6973
assembly-version: ${{ needs.versioning.outputs.ASSEMBLY_VERSION }}
7074
assembly-informational-version: ${{ needs.versioning.outputs.ASSEMBLY_INFORMATIONAL_VERSION }}
7175
assembly-file-version: ${{ needs.versioning.outputs.FILE_VERSION }}
72-
# - name: Setup .NET ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
76+
build-glob-pattern: ${{ vars.BUILD_DEFAULT_GLOB_PATTERN }}
77+
# - name: Setup .NET ${{ env.dotnet-sdk-version }}
7378
# uses: actions/setup-dotnet@v4
7479
# with:
75-
# dotnet-version: ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
76-
# - name: Build with .NET ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
77-
# run: dotnet build ${{ vars.SRC_SEARCH_PATTERN }} --configuration ${{ vars.DEFAULT_BUILD_CONFIGURATION }} /p:Platform=${{ vars.DEFAULT_BUILD_PLATFORM }} /p:Version=${{ env.ASSEMBLY_VERSION }} /p:AssemblyInformationalVersion=${{ env.ASSEMBLY_INFORMATIONAL_VERSION }} /p:FileVersion=${{ env.FILE_VERSION }}
80+
# dotnet-version: ${{ env.dotnet-sdk-version }}
81+
# - name: Build with .NET ${{ env.dotnet-sdk-version }}
82+
# run: dotnet build ${{ vars.SRC_SEARCH_PATTERN }} --configuration ${{ env.build-configuration }} /p:Platform=${{ env.build-platform }} /p:Version=${{ env.ASSEMBLY_VERSION }} /p:AssemblyInformationalVersion=${{ env.ASSEMBLY_INFORMATIONAL_VERSION }} /p:FileVersion=${{ env.FILE_VERSION }}
7883
# - name: Upload Build
7984
# uses: actions/upload-artifact@v4
8085
# with:
@@ -84,17 +89,17 @@ jobs:
8489
# **/obj/*
8590

8691
test:
87-
name: Test with .NET ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
92+
name: Test with .NET ${{ env.dotnet-sdk-version }}
8893
needs: [build]
8994
runs-on: ubuntu-latest
9095
steps:
9196
- uses: actions/checkout@v4
92-
- name: Setup .NET ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
97+
- name: Setup .NET ${{ env.dotnet-sdk-version }}
9398
uses: actions/setup-dotnet@v4
9499
with:
95-
dotnet-version: ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
96-
- name: Test with .NET ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
97-
run: dotnet test ${{ vars.TEST_SEARCH_PATTERN }} --configuration ${{ vars.DEFAULT_BUILD_CONFIGURATION }} --verbosity normal --settings unit-test.runsettings -- --coverage --coverage-output-format cobertura --report-trx --results-directory ${{ runner.temp }}/test-results/
100+
dotnet-version: ${{ env.dotnet-sdk-version }}
101+
- name: Test with .NET ${{ env.dotnet-sdk-version }}
102+
run: dotnet test ${{ vars.TEST_DEFAULT_GLOB_PATTERN }} --configuration ${{ env.build-configuration }} --verbosity normal --settings unit-test.runsettings -- --coverage --coverage-output-format cobertura --report-trx --results-directory ${{ runner.temp }}/test-results/
98103
- name: Upload Test Results
99104
uses: actions/upload-artifact@v4
100105
with:
@@ -118,7 +123,7 @@ jobs:
118123
name: Write Code Coverage Summary
119124

120125
pack:
121-
name: Pack with .NET ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
126+
name: Pack with .NET ${{ env.dotnet-sdk-version }}
122127
needs: [build, versioning]
123128
runs-on: ubuntu-latest
124129
env:
@@ -128,16 +133,16 @@ jobs:
128133
PACKAGE_VERSION: ${{ needs.versioning.outputs.PACKAGE_VERSION }}
129134
steps:
130135
- uses: actions/checkout@v4
131-
- name: Setup .NET ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
136+
- name: Setup .NET ${{ env.dotnet-sdk-version }}
132137
uses: actions/setup-dotnet@v4
133138
with:
134-
dotnet-version: ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
139+
dotnet-version: ${{ env.dotnet-sdk-version }}
135140
- name: Download Build
136141
uses: actions/download-artifact@v4
137142
with:
138143
name: build
139-
- name: Pack with .NET ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
140-
run: dotnet pack ${{ vars.SRC_SEARCH_PATTERN }} --no-build --no-restore --configuration ${{ vars.DEFAULT_BUILD_CONFIGURATION }} /p:Platform=${{ vars.DEFAULT_BUILD_PLATFORM }} /p:PackageVersion=${{ env.PACKAGE_VERSION }} /p:Version=${{ env.ASSEMBLY_VERSION }} /p:AssemblyInformationalVersion=${{ env.ASSEMBLY_INFORMATIONAL_VERSION }} /p:FileVersion=${{ env.FILE_VERSION }} --output ${{ runner.temp }}/packages/
144+
- name: Pack with .NET ${{ env.dotnet-sdk-version }}
145+
run: dotnet pack ${{ vars.SRC_SEARCH_PATTERN }} --no-build --no-restore --configuration ${{ env.build-configuration }} /p:Platform=${{ env.build-platform }} /p:PackageVersion=${{ env.PACKAGE_VERSION }} /p:Version=${{ env.ASSEMBLY_VERSION }} /p:AssemblyInformationalVersion=${{ env.ASSEMBLY_INFORMATIONAL_VERSION }} /p:FileVersion=${{ env.FILE_VERSION }} --output ${{ runner.temp }}/packages/
141146
- name: Upload Package
142147
uses: actions/upload-artifact@v4
143148
with:
@@ -148,7 +153,7 @@ jobs:
148153
149154
benchmark:
150155
if: ${{ github.env.is_release || vars.BENCHMARKDOTNET_RUN_OVERRIDE == 'true' }}
151-
name: Benchmark with .NET ${{ vars.DEFAULT_DOTNET_SDK_VERSION }} on ${{ matrix.os }}
156+
name: Benchmark with .NET ${{ env.dotnet-sdk-version }} on ${{ matrix.os }}
152157
needs: [build]
153158
strategy:
154159
matrix:
@@ -169,7 +174,7 @@ jobs:
169174
name: build
170175
- name: Benchmark
171176
working-directory: ${{ vars.BENCHMARKDOTNET_WORKING_DIRECTORY }}
172-
run: dotnet run --configuration ${{ vars.DEFAULT_BUILD_CONFIGURATION }} /p:Platform=${{ vars.DEFAULT_BUILD_PLATFORM }} --framework ${{ vars.DEFAULT_BUILD_FRAMEWORK }} --runtimes ${{ vars.BENCHMARKDOTNET_RUNTIMES }} --filter ${{ vars.BENCHMARKDOTNET_FILTER }} --exporters GitHub --memory --artifacts ${{ runner.temp }}/benchmarks/ --join
177+
run: dotnet run --configuration ${{ env.build-configuration }} /p:Platform=${{ env.build-platform }} --framework ${{ vars.DEFAULT_BUILD_FRAMEWORK }} --runtimes ${{ vars.BENCHMARKDOTNET_RUNTIMES }} --filter ${{ vars.BENCHMARKDOTNET_FILTER }} --exporters GitHub --memory --artifacts ${{ runner.temp }}/benchmarks/ --join
173178
- name: Upload Benchmark Results
174179
uses: actions/upload-artifact@v4
175180
with:
@@ -183,7 +188,7 @@ jobs:
183188

184189
publish-docs:
185190
if: ${{ github.env.is_release && !github.env.is_preview }}
186-
name: Docs with .NET ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
191+
name: Docs with .NET ${{ env.dotnet-sdk-version }}
187192
needs: [benchmark, test]
188193
environment:
189194
name: github-pages
@@ -195,7 +200,7 @@ jobs:
195200
- name: Dotnet Setup
196201
uses: actions/setup-dotnet@v4
197202
with:
198-
dotnet-version: ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
203+
dotnet-version: ${{ env.dotnet-sdk-version }}
199204
- name: Download Benchmarks
200205
uses: actions/download-artifact@v4
201206
with:
@@ -222,7 +227,7 @@ jobs:
222227

223228
publish-package-internal:
224229
if: ${{ !github.env.is_release }}
225-
name: Publish package with .NET ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
230+
name: Publish package with .NET ${{ env.dotnet-sdk-version }}
226231
needs: [pack]
227232
environment:
228233
name: private-nuget-feed
@@ -233,7 +238,7 @@ jobs:
233238
- name: Dotnet Setup
234239
uses: actions/setup-dotnet@v4
235240
with:
236-
dotnet-version: ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
241+
dotnet-version: ${{ env.dotnet-sdk-version }}
237242
- name: Download Packages
238243
uses: actions/download-artifact@v4
239244
with:
@@ -246,7 +251,7 @@ jobs:
246251
247252
release-package:
248253
if: ${{ github.env.is_release }}
249-
name: Release package with .NET ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
254+
name: Release package with .NET ${{ env.dotnet-sdk-version }}
250255
needs: [pack, test]
251256
environment:
252257
name: public-nuget-feed
@@ -257,7 +262,7 @@ jobs:
257262
- name: Dotnet Setup
258263
uses: actions/setup-dotnet@v4
259264
with:
260-
dotnet-version: ${{ vars.DEFAULT_DOTNET_SDK_VERSION }}
265+
dotnet-version: ${{ env.dotnet-sdk-version }}
261266
- name: Download Packages
262267
uses: actions/download-artifact@v4
263268
with:

0 commit comments

Comments
 (0)