Separate NuGet publish into its own stage after pushing the git tag#27611
Open
jshigetomi wants to merge 2 commits into
Open
Separate NuGet publish into its own stage after pushing the git tag#27611jshigetomi wants to merge 2 commits into
jshigetomi wants to merge 2 commits into
Conversation
Applies the intent of PowerShell#27316 (closed due to merge conflicts) on top of current master. - Extract NuGet publishing into a dedicated template release-Nuget.yml. - Rename release-githubNuget.yml to release-github.yml; it now only creates the GitHub release draft. - Rename stage PublishGitHubReleaseAndNuget to PublishGitHubRelease and point PushGitTagAndMakeDraftPublic at it. - Add a new PublishNugetRelease stage that runs after PushGitTagAndMakeDraftPublic so NuGet packages publish only after the git tag is pushed and the draft is made public. - Depend the NuGet stage directly on setReleaseTagAndChangelog so the OutputVersion.Version stageDependencies output variable resolves (Azure DevOps only exposes output variables to directly dependent stages); also fixed the template reference casing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request refactors the release pipeline to publish NuGet packages in a separate stage that runs after the git tag is pushed and the GitHub draft release is made public, improving release sequencing and isolating responsibilities.
Changes:
- Split the combined GitHub+NuGet publishing stage into separate
PublishGitHubReleaseandPublishNugetReleasestages, adjusting dependencies so NuGet publishing happens after tag push/draft publish. - Introduce a dedicated
release-Nuget.ymltemplate for NuGet publishing. - Remove the NuGet publish job from
release-github.yml, leaving it responsible only for creating the GitHub release draft.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .pipelines/templates/stages/PowerShell-Release-Stages.yml | Splits GitHub vs NuGet publishing into separate stages and reorders dependencies to publish NuGet after tag push/draft publish. |
| .pipelines/templates/release-Nuget.yml | Adds a dedicated NuGet publishing job template consuming the release version output. |
| .pipelines/templates/release-github.yml | Removes NuGet publishing job so the template only creates the GitHub release draft. |
| variables: | ||
| - template: ./variables/release-shared.yml@self | ||
| parameters: | ||
| VERSION: $[ stageDependencies.setReleaseTagAndChangelog.SetTagAndChangelog.outputs['OutputVersion.Version'] ] |
adityapatwardhan
approved these changes
Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applies the intent of #27316 (closed due to merge
conflicts) on top of current master.
creates the GitHub release draft.
point PushGitTagAndMakeDraftPublic at it.
PushGitTagAndMakeDraftPublic so NuGet packages publish only after the
git tag is pushed and the draft is made public.
OutputVersion.Version stageDependencies output variable resolves
(Azure DevOps only exposes output variables to directly dependent
stages); also fixed the template reference casing.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
PR Summary
This pull request refactors the release pipeline by separating the NuGet publishing process from the GitHub release process, improving clarity and maintainability. The main changes involve splitting the previously combined GitHub and NuGet release stages into distinct stages and templates, and updating the related pipeline configuration files accordingly.
Pipeline structure refactoring:
PublishGitHubReleaseAndNuget) is split into two separate stages:PublishGitHubRelease(for GitHub releases) andPublishNugetRelease(for NuGet publishing), each with its own template and dependencies. (.pipelines/templates/stages/PowerShell-Release-Stages.yml) [1] [2]release-github.yml), and a new dedicated template (release-Nuget.yml) is created to handle NuGet publishing. (.pipelines/templates/release-github.yml,.pipelines/templates/release-Nuget.yml) [1] [2]Template and job updates:
release-Nuget.ymltemplate introduces askipPublishparameter and defines the NuGet publishing job, including steps for preparing and pushing packages. (.pipelines/templates/release-Nuget.yml).pipelines/templates/stages/PowerShell-Release-Stages.yml) [1] [2]These changes make the release process more modular and easier to manage by decoupling the GitHub and NuGet publishing workflows.
PR Context
Two optimization for the release pipeline, separated GitHub and NuGet releases to separate stages. Approvals seem to propagate to other stages across the pipeline.
Removed the Windows package manual validation.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header