Skip to content

Commit df6e6fb

Browse files
Publish azure emitter on merges to main (Azure#49261)
* Publish azure emitter on merges to main * pr fb * remove variables * shouldpublish
1 parent f23f071 commit df6e6fb

File tree

1 file changed

+12
-4
lines changed
  • eng/packages/http-client-csharp

1 file changed

+12
-4
lines changed

eng/packages/http-client-csharp/ci.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,18 @@ extends:
5454
BuildPrereleaseVersion: ${{ parameters.BuildPrereleaseVersion }}
5555
UseTypeSpecNext: ${{ parameters.UseTypeSpecNext }}
5656
${{ if eq(variables['System.TeamProject'], 'internal') }}:
57-
ShouldPublish: ${{ parameters.ShouldPublish }}
58-
PublishPublic: ${{ parameters.PublishPublic }}
59-
PublishDependsOnTest: ${{ parameters.PublishPublic }}
60-
ShouldRegenerate: ${{ parameters.ShouldRegenerate }}
57+
${{ if eq(variables['Build.Reason'], 'Manual') }}:
58+
ShouldPublish: ${{ parameters.ShouldPublish }}
59+
${{ if startswith(variables['Build.SourceBranch'], 'refs/pull/') }}: # PR ref's can't be published to public, even in a manual run
60+
PublishPublic: false
61+
PublishDependsOnTest: false
62+
${{ else }}: # Any other manual run can go to public
63+
PublishPublic: ${{ parameters.PublishPublic }}
64+
PublishDependsOnTest: ${{ parameters.PublishPublic }}
65+
${{ else }}: # All automatic runs publish, but only CI of main goes public
66+
ShouldPublish: true
67+
PublishDependsOnTest: false
68+
PublishPublic: ${{ and(eq(variables['Build.Reason'], 'IndividualCI'), eq(variables['Build.SourceBranch'], 'refs/head/main')) }}
6169
RegenerationJobCount: 5
6270
MinimumPerJob: 10
6371
OnlyGenerateTypespec: true

0 commit comments

Comments
 (0)