Skip to content

Commit 898249f

Browse files
authored
Merge pull request #6119 from dibarbet/dev/dibarbet/prerelease_from_main
Support prerelease from main instead of prerelease
2 parents 7a3ff63 + cfa4dd8 commit 898249f

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

azure-pipelines-official.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ trigger:
22
branches:
33
include:
44
- main
5-
- prerelease
65
- release
76
pr: none
87

azure-pipelines.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ trigger:
33
branches:
44
include:
55
- feature/*
6-
- prerelease
76
- release
87
- main
98

109
pr:
1110
- feature/*
12-
- prerelease
1311
- release
1412
- main
1513

azure-pipelines/release.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
trigger: none
22
pr: none
33

4+
resources:
5+
pipelines:
6+
- pipeline: officialBuildCI
7+
source: dotnet-vscode-csharp
8+
branch: main
9+
410
parameters:
511
- name: test
612
type: boolean
713
default: true
8-
- name: branch
9-
type: string
10-
default: prerelease
11-
values:
12-
- prerelease
13-
- release
1414

1515
variables:
1616
# This is expected to provide VisualStudioMarketplacePAT to the release (https://code.visualstudio.com/api/working-with-extensions/publishing-extension#get-a-personal-access-token)
@@ -27,8 +27,9 @@ jobs:
2727
buildType: 'specific'
2828
project: 'internal'
2929
definition: 1264
30-
buildVersionToDownload: 'latestFromBranch'
31-
branchName: 'refs/heads/${{ parameters.branch }}'
30+
buildVersionToDownload: 'specific'
31+
buildId: '$(resources.pipeline.officialBuildCI.runID)'
32+
branchName: '$(resources.pipeline.officialBuildCI.sourceBranch)'
3233
- pwsh: |
3334
npm install --global vsce
3435
displayName: 'Install vsce'
@@ -44,13 +45,13 @@ jobs:
4445
4546
$additionalPublishArgs = , "publish"
4647
# Artifacts are published to either pre-release or release based on the build branch, https://code.visualstudio.com/api/working-with-extensions/publishing-extension#prerelease-extensions
47-
If ("${{ parameters.branch }}" -eq "prerelease") {
48+
If ("$(resources.pipeline.officialBuildCI.sourceBranch)" -eq "refs/heads/main") {
4849
$additionalPublishArgs += "--pre-release"
4950
Write-Host "Publish to pre-release channel."
50-
} ElseIf ("${{ parameters.branch }}" -eq "release") {
51+
} ElseIf ("$(resources.pipeline.officialBuildCI.sourceBranch)" -eq "refs/heads/release") {
5152
Write-Host "Publish to release channel."
5253
} Else {
53-
throw "Unexpected branch name: ${{ parameters.branch }}."
54+
throw "Unexpected branch name: $(resources.pipeline.officialBuildCI.sourceBranch)."
5455
}
5556
$additionalPublishArgs += '--packagePath'
5657

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "2.0",
44
"publicReleaseRefSpec": [
55
"^refs/heads/release$",
6-
"^refs/heads/prerelease$"
6+
"^refs/heads/main$"
77
],
88
"cloudBuild": {
99
"buildNumber": {

0 commit comments

Comments
 (0)