From 67e0cd42832c4ceecf19b015ddb1a9466399ae91 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 11:46:22 +0000 Subject: [PATCH 1/2] Initial plan From 0744c9f1451b9745e689dcec68b2eaeaaf9a7314 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 11:49:52 +0000 Subject: [PATCH 2/2] Apply review feedback: fix versioning, no-restore flag, and NuGet push gating Co-authored-by: mkrueger <341098+mkrueger@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- .github/workflows/package-unsigned.yml | 4 +++- .pipelines/CosmosDB-Shell-Official.yml | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99184d9..706ddec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: - name: Run fuzzer smoke test working-directory: CosmosDBShell.Fuzzer - run: dotnet run --configuration $env:BUILD_CONFIGURATION --no-build -- --all + run: dotnet run --configuration $env:BUILD_CONFIGURATION --no-build --no-restore -- --all shell: pwsh - name: Upload test results diff --git a/.github/workflows/package-unsigned.yml b/.github/workflows/package-unsigned.yml index 56c25b4..b55ebe8 100644 --- a/.github/workflows/package-unsigned.yml +++ b/.github/workflows/package-unsigned.yml @@ -121,9 +121,11 @@ jobs: New-Item -ItemType Directory -Path out/nupkg -Force | Out-Null dotnet pack CosmosDBShell/CosmosDBShell.csproj ` --configuration $env:BUILD_CONFIGURATION ` - --no-build ` --no-restore ` --output out/nupkg ` + /p:Version=${{ steps.version.outputs.package_version }} ` + /p:FileVersion=${{ steps.version.outputs.file_version }} ` + /p:InformationalVersion=${{ steps.version.outputs.informational_version }} ` /p:PackageVersion=${{ steps.version.outputs.package_version }} ` /p:ContinuousIntegrationBuild=true diff --git a/.pipelines/CosmosDB-Shell-Official.yml b/.pipelines/CosmosDB-Shell-Official.yml index 3f1af9b..9724e09 100644 --- a/.pipelines/CosmosDB-Shell-Official.yml +++ b/.pipelines/CosmosDB-Shell-Official.yml @@ -122,6 +122,7 @@ extends: if ($buildNumber -ne $version) { Write-Host "Updating Build.BuildNumber to normalized NuGet version: $version" Write-Host "##vso[build.updatebuildnumber]$version" + $buildNumber = $version } $fileVersion = $version @@ -494,7 +495,7 @@ extends: - task: NuGetCommand@2 displayName: "Push RID-specific NuGet packages" - condition: succeeded() + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) inputs: command: "push" packagesToPush: | @@ -508,7 +509,7 @@ extends: allowPackageConflicts: true - task: NuGetCommand@2 displayName: "Push pointer NuGet package" - condition: succeeded() + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) inputs: command: "push" packagesToPush: "$(Build.SourcesDirectory)\\out\\nupkg\\CosmosDBShell.$(CosmosDBShell_Version).nupkg"