Open
Restrict extension release publishing to main#9639
Conversation
|
Azure Pipelines: 19 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Restrict extension release publishing to main branch
Restrict extension release publishing to main
Aug 19, 2026
JeffreyCA
marked this pull request as ready for review
August 19, 2026 20:22
JeffreyCA
requested review from
Rick Winter (RickWinter),
Daniel Jurek (danieljurek),
Richard Park (richardpark-msft),
tg-msft and
Victor Vazquez (vhvb1989)
as code owners
August 19, 2026 20:22
|
Azure Pipelines: 21 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Restricts official extension publishing to builds sourced from main, preventing feature branches from creating conflicting releases.
Changes:
- Adds a
Build.SourceBranchguard to the publishing stage. - Keeps build, test, signing, packaging, and PR bundle flows unchanged.
Show a summary per file
| File | Description |
|---|---|
eng/pipelines/templates/stages/publish-extension.yml |
Limits the shared release publishing stage to refs/heads/main. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
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.
Fixes #9408
Summary
This PR prevents extension release publishing from feature branches. Manual extension pipeline runs can still build, test, sign, and package artifacts, but only runs sourced from
refs/heads/mainmay enter the shared publishing stage.Issue
A manual run from any branch could create a real Git tag and GitHub release, upload artifacts to the durable
<extension>/<version>storage path, and open a registry update PR. A feature branch could therefore consume a release tag before the officialmainrelease and block that release until someone manually deleted the conflicting tag and GitHub release.Change
The
PublishExtensionstage now requires:eq(variables['Build.SourceBranch'], 'refs/heads/main')Applying the guard at the stage boundary covers GitHub release creation, durable storage uploads, and registry updates. Build and signing stages remain available on any branch. PR bundle publishing from #9553 is separate and remains available where that pipeline integration is enabled.
Testing
Azure Pipelines run 20260819.1 exercised commit
b36521529008d921ae98387c88b23f35441a7c9ffromrefs/heads/copilot/restrict-extension-release-publishing.The run completed successfully and produced the expected build and signed release artifacts. Azure Pipelines skipped the complete
PublishExtensionstage for the feature branch.Skip.Publish=trueandSkip.RegistryUpdate=truewere also set as safeguards.