From a3b404cf71abb6bfd72ce9ce06b83be7720a7ef1 Mon Sep 17 00:00:00 2001 From: Ray Chen Date: Thu, 23 Jul 2026 11:11:19 -0700 Subject: [PATCH] Use 'none' environment for auto-release publish to skip manual approval gate Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c896e16a-4a37-45eb-9f29-3b5d0cf3375b --- eng/pipelines/templates/stages/archetype-python-release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 6632d6f6bdd3..1c4e028a1c01 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -141,7 +141,11 @@ stages: - deployment: PublishPackage displayName: "Publish to ${{ parameters.PublicFeed }}" condition: and(succeeded(), ne(variables['Skip.PublishPackage'], 'true')) - environment: ${{ parameters.PublicPublishEnvironment }} + # Auto-release runs after merge on main and must not wait on the package-publish approval gate. + ${{ if and(eq(variables['Build.Reason'], 'IndividualCI'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}: + environment: none + ${{ else }}: + environment: ${{ parameters.PublicPublishEnvironment }} dependsOn: TagRepository templateContext: