diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1f2a9e88af..a796be61f0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -124,7 +124,12 @@ jobs: - name: Build shell: pwsh run: | - dotnet build --no-restore --configuration Release --version-suffix=$env:PACKAGE_VERSION_SUFFIX + if ($env:PACKAGE_VERSION_SUFFIX) { + dotnet build --no-restore --configuration Release --version-suffix=$env:PACKAGE_VERSION_SUFFIX + } + else { + dotnet build --no-restore --configuration Release + } - name: Test run: | 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: - name: Generate packages shell: pwsh run: | - dotnet pack --no-build --configuration Release --output $env:GITHUB_WORKSPACE/artifacts/packages --version-suffix=$env:PACKAGE_VERSION_SUFFIX + if ($env:PACKAGE_VERSION_SUFFIX) { + dotnet pack --no-build --configuration Release --output $env:GITHUB_WORKSPACE/artifacts/packages --version-suffix=$env:PACKAGE_VERSION_SUFFIX + } + else { + dotnet pack --no-build --configuration Release --output $env:GITHUB_WORKSPACE/artifacts/packages + } - name: Upload packages to artifacts if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v3