Skip to content

Commit 05a71e1

Browse files
committed
Fix build on missing version suffix
1 parent 7902e3d commit 05a71e1

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Diff for: .github/workflows/build.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,12 @@ jobs:
124124
- name: Build
125125
shell: pwsh
126126
run: |
127-
dotnet build --no-restore --configuration Release --version-suffix=$env:PACKAGE_VERSION_SUFFIX
127+
if ($env:PACKAGE_VERSION_SUFFIX) {
128+
dotnet build --no-restore --configuration Release --version-suffix=$env:PACKAGE_VERSION_SUFFIX
129+
}
130+
else {
131+
dotnet build --no-restore --configuration Release
132+
}
128133
- name: Test
129134
run: |
130135
dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --logger "GitHubActions;summary.includeSkippedTests=true" -- RunConfiguration.CollectSourceInformation=true DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.DeterministicReport=true
@@ -134,7 +139,12 @@ jobs:
134139
- name: Generate packages
135140
shell: pwsh
136141
run: |
137-
dotnet pack --no-build --configuration Release --output $env:GITHUB_WORKSPACE/artifacts/packages --version-suffix=$env:PACKAGE_VERSION_SUFFIX
142+
if ($env:PACKAGE_VERSION_SUFFIX) {
143+
dotnet pack --no-build --configuration Release --output $env:GITHUB_WORKSPACE/artifacts/packages --version-suffix=$env:PACKAGE_VERSION_SUFFIX
144+
}
145+
else {
146+
dotnet pack --no-build --configuration Release --output $env:GITHUB_WORKSPACE/artifacts/packages
147+
}
138148
- name: Upload packages to artifacts
139149
if: matrix.os == 'ubuntu-latest'
140150
uses: actions/upload-artifact@v3

0 commit comments

Comments
 (0)