Skip to content

Bump version to 2.0.0-beta.4 and scope external-release pipeline to main only#1793

Merged
badrishc merged 4 commits into
mainfrom
badrishc/release-v2-beta4
May 12, 2026
Merged

Bump version to 2.0.0-beta.4 and scope external-release pipeline to main only#1793
badrishc merged 4 commits into
mainfrom
badrishc/release-v2-beta4

Conversation

@badrishc

@badrishc badrishc commented May 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two changes to the v2 release line on main:

  1. Cut next v2 beta: Version.props 2.0.0-beta.3 → 2.0.0-beta.4.
  2. Scope external-release pipeline to main only: .azure/pipelines/azure-pipelines-external-release.yml no longer triggers from dev and no longer carries any preview-release plumbing tied to dev. The GitHub release Pre-release flag is now auto-derived from the version string so v2 betas stay marked as prereleases without manual maintenance.

YAML changes

  • trigger.branches.include: drop dev, keep only main
  • GitHubRelease@1 condition: or(SourceBranchName=="main", SourceBranchName=="dev")eq(Build.SourceBranch, "refs/heads/main")
  • NuGetCommand@2 condition: same simplification
  • Drop the releaseTitle powershell shim (was only used to prefix PREVIEW for dev runs); title is now literal Garnet v$(Build.BuildNumber)
  • Drop isPreRelease: ${{ eq(SourceBranchName, "dev") }} (was always false on main runs)
  • Add a small powershell step right after extract_version.ps1 that sets pipeline variable isPreRelease = true iff Build.BuildNumber contains - (a SemVer prerelease label), and wire GitHubRelease@1 to consume it via isPreRelease: $(isPreRelease)

Build.SourceBranch is used (full refs/heads/main) instead of SourceBranchName for consistency with the v1 pipeline (#1792).

Resulting prerelease behavior (no future maintenance)

Version isPreRelease GitHub Latest badge
2.0.0-beta.4 true no (correct — still v1.x)
2.0.0 (GA) false yes
1.1.x patches false yes (per existing v1 line)

Release behavior on merge

Merging this PR pushes a Version.props change onto main, which:

  1. Triggers the external-release ADO pipeline (main copy of YAML, paths-filter on Version.props, branches-filter on main).
  2. Builds, signs, and packs Garnet at version 2.0.0-beta.4.
  3. Creates GitHub Release Garnet v2.0.0-beta.4 (tag v2.0.0-beta.4, prerelease=true via auto-detect).
  4. Pushes Microsoft.Garnet.2.0.0-beta.4.nupkg and garnet-server.2.0.0-beta.4.nupkg to NuGet.org.
  5. Tag-push fires docker-linux.yml + docker-windows.yml → 5 Linux + 1 Windows images published to GHCR with tag 2.0.0-beta.4. Per docker/metadata-action defaults, prereleases do not get short 2/2.0 tags, and :latest is gated on default-branch tags so it is not moved by a beta release. The release/v1 line 1/1.1 tags are unaffected.

Audit checks

  • NuGet: Microsoft.Garnet and garnet-server currently published up to 2.0.0-beta.3; 2.0.0-beta.4 does not exist on either feed → push will not be rejected.
  • Git: no v2.0.0-beta.4 tag exists yet → GitHub release creation will not collide.
  • After merge, dev-branch pushes (including Version.props changes on dev) will no longer trigger this pipeline.

Triggers the external-release ADO pipeline on merge to main, which
will publish Microsoft.Garnet 2.0.0-beta.4 and garnet-server 2.0.0-beta.4
to NuGet.org and create GitHub Release v2.0.0-beta.4.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 12, 2026 19:26
Removes the dev branch path from the v2 release pipeline:
- trigger.branches.include: drop 'dev', keep only 'main'
- GitHubRelease/NuGet push conditions: simplified from or(main,dev)
  to a single eq on Build.SourceBranch == refs/heads/main
- Drop the releaseTitle powershell shim and 'isPreRelease' flag
  (only mattered when dev was producing PREVIEW releases)

dev pushes will no longer trigger the external release pipeline.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@badrishc badrishc changed the title Bump version from 2.0.0-beta.3 to 2.0.0-beta.4 Bump version to 2.0.0-beta.4 and scope external-release pipeline to main only May 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Garnet’s release version for the next v2 beta and also alters the external release Azure Pipeline behavior. While the stated intent is a simple Version.props bump, the pipeline changes materially affect how/when GitHub Releases and NuGet publishing run.

Changes:

  • Bump VersionPrefix from 2.0.0-beta.3 to 2.0.0-beta.4.
  • Update the external release pipeline to run release/publish steps only on main (and remove dev prerelease handling).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Version.props Bumps the package/build version to 2.0.0-beta.4.
.azure/pipelines/azure-pipelines-external-release.yml Changes trigger/conditions and removes dev prerelease behavior for GitHub Release/NuGet publish steps.
Comments suppressed due to low confidence (2)

.azure/pipelines/azure-pipelines-external-release.yml:14

  • PR description states there are no pipeline changes, but this hunk removes dev from the trigger branch filter. Please either (1) update the PR description to reflect the new release behavior (main-only) and its implications, or (2) revert this pipeline change so the PR remains a pure version bump.
  branches:
    include:
    - main
  paths:
    include:
    - Version.props

.azure/pipelines/azure-pipelines-external-release.yml:219

  • Removing isPreRelease means the GitHub release will default to a non-prerelease even if this pipeline is ever run from a non-main branch again (e.g., via manual runs or future trigger changes). If preview releases are part of the expected flow, keep isPreRelease (and the branch-based title) to avoid accidentally creating a public non-prerelease release from a preview branch.
      tagSource: userSpecifiedTag
      tag: 'v$(Build.BuildNumber)'
      title: 'Garnet v$(Build.BuildNumber)'
      releaseNotesSource: inline

Comment thread .azure/pipelines/azure-pipelines-external-release.yml Outdated
badrishc and others added 2 commits May 12, 2026 12:33
Adds a powershell step right after extract_version.ps1 that sets a
pipeline variable 'isPreRelease' = true when Build.BuildNumber
contains a '-' (i.e., a SemVer prerelease label like '-beta.4').

GitHubRelease@1 now consumes 'isPreRelease: $(isPreRelease)' so:
- 2.0.0-beta.x  -> prerelease=true (does NOT become 'Latest')
- 2.0.0 (GA)    -> prerelease=false (becomes 'Latest')
- 1.1.x patches -> prerelease=false

No future maintenance needed when v2 GA ships.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extends the powershell shim that already sets 'isPreRelease' to also
set 'releaseTitle' = 'Garnet PREVIEW v$(Build.BuildNumber)' when the
version is a SemVer prerelease (contains '-'), else 'Garnet v...'.

GitHubRelease@1 now consumes 'title: $(releaseTitle)'. Net effect:
- 2.0.0-beta.x  -> 'Garnet PREVIEW v2.0.0-beta.x' + prerelease=true
- 2.0.0 (GA)    -> 'Garnet v2.0.0'                + prerelease=false
- 1.1.x patches -> 'Garnet v1.1.x'                 + prerelease=false

Restores naming consistency with prior PREVIEW beta releases
(v2.0.0-beta.{1,2,3}) without re-introducing branch-based logic.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@badrishc badrishc merged commit 7758c68 into main May 12, 2026
25 of 27 checks passed
@badrishc badrishc deleted the badrishc/release-v2-beta4 branch May 12, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants