Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion azure-pipelines-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ parameters:
type: boolean
default: true

# If running on a branch that's not in PublishData.json but still want to publish packages for VS insertion, set this to `main`.
- name: PublishAsBranch
type: string
default: current

# The variables `_DotNetArtifactsCategory` and `_DotNetValidationArtifactsCategory` are required for proper publishing of build artifacts. See https://github.com/dotnet/roslyn/pull/38259
variables:
- name: _DotNetArtifactsCategory
Expand Down Expand Up @@ -72,6 +77,12 @@ variables:
- name: Insertion.TitleSuffix
value: ''

- name: PublishAsBranchOrNull
${{ if eq(parameters.PublishAsBranch, 'current') }}:
value: null
${{ else }}:
value: ${{ parameters.PublishAsBranch }}

stages:

- stage: build
Expand Down Expand Up @@ -213,7 +224,7 @@ stages:
displayName: Publish Assets
inputs:
filePath: 'eng\publish-assets.ps1'
arguments: '-configuration $(BuildConfiguration) -branchName "$(SourceBranchName)"'
arguments: '-configuration $(BuildConfiguration) -branchName "${{ coalesce(variables.PublishAsBranchOrNull, variables.SourceBranchName) }}"'
condition: succeeded()

# Publish OptProf configuration files
Expand Down