[release/v7.5.9] Separate NuGet publish into its own stage after pushing the git tag#27650
Open
SeeminglyScience wants to merge 1 commit into
Conversation
…owerShell#27611) Co-authored-by: Justin Chung <chungjustin@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the release pipeline on release/v7.5.9 to ensure NuGet publishing happens only after the git tag is pushed and the GitHub draft release is made public, by splitting previously combined release responsibilities into separate stages/templates.
Changes:
- Split the prior combined GitHub+NuGet publishing stage into separate
PublishGitHubReleaseandPublishNugetReleasestages with updated dependencies/order. - Introduce a dedicated NuGet publishing template (
release-Nuget.yml) and remove NuGet publishing from the GitHub release template. - Remove the Windows packages manual validation approval job from the
ManualValidationstage.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
.pipelines/templates/stages/PowerShell-Release-Stages.yml |
Rewires release stages to separate GitHub vs NuGet publishing and adjust stage dependencies/order; also removes Windows manual validation job. |
.pipelines/templates/release-Nuget.yml |
New standalone NuGet publishing job template (downloads packages and pushes to NuGet). |
.pipelines/templates/release-github.yml |
Removes the embedded NuGet publishing job so this template only creates the GitHub release draft. |
Comment on lines
+50
to
+54
| condition: and(ne('${{ parameters.skipPublish }}', 'true'), succeeded()) | ||
|
|
||
| - task: NuGetCommand@2 | ||
| displayName: 'NuGet push' | ||
| condition: and(ne('${{ parameters.skipPublish }}', 'true'), succeeded()) |
| targetType: inline | ||
| script: | | ||
| #Exclude all global tool packages. Their names start with 'PowerShell.' | ||
| $null = New-Item -ItemType Directory -Path "$(Pipeline.Workspace)/release" |
Comment on lines
+42
to
+45
| if ($releaseVersion -notlike '*-*') { | ||
| # Copy the global tool package for stable releases | ||
| Copy-Item $globalToolPath -Destination "$(Pipeline.Workspace)/release" | ||
| } |
| Make the GitHub Release Draft Public | ||
|
|
||
| - stage: PublishNugetRelease | ||
| displayName: Publish Nuget Release |
Comment on lines
99
to
103
| - stage: ManualValidation | ||
| dependsOn: [] | ||
| displayName: Manual Validation | ||
| jobs: | ||
| - template: /.pipelines/templates/approvalJob.yml@self | ||
| parameters: | ||
| displayName: Validate Windows Packages | ||
| jobName: ValidateWinPkg | ||
| instructions: | | ||
| Validate zip package on windows | ||
|
|
||
| - template: /.pipelines/templates/approvalJob.yml@self |
9 tasks
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.
Backport of #27611 to release/v7.5.9
Triggered by @SeeminglyScience on behalf of @jshigetomi
Original CL Label: CL-BuildPackaging
/cc @PowerShell/powershell-maintainers
Impact
REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.
Tooling Impact
Separates NuGet publishing into a dedicated stage that runs after the git tag is pushed and the GitHub draft is made public. This ensures correct release sequencing and makes the pipeline more modular.
Customer Impact
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
This is a release pipeline structural change that can only be validated in an actual release run. The same change was successfully backported to v7.4.x via #27648. No unit tests are applicable for Azure DevOps pipeline YAML changes.
Risk
REQUIRED: Check exactly one box.
Separates previously combined GitHub and NuGet release stages into distinct stages for correct ordering and modularity. The logic itself is unchanged — only the pipeline structure is refactored. Successfully applied to 7.4.x already.