forked from shayki5/azure-devops-create-pr-task
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
48 lines (41 loc) · 1.37 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
trigger:
- master
pool:
vmImage: 'windows-2019'
variables:
version: $[ counter('revision-new',0) ]
steps:
- task: TfxInstaller@1
displayName: 'Use Node CLI for Azure DevOps (tfx-cli): v0.6.x'
- task: PowerShell@2
displayName: 'Increment the task version in task.json'
inputs:
targetType: 'inline'
script: |
$jsonPath = "$(Build.SourcesDirectory)/task/task.json"
$taskJson = Get-Content $jsonPath | ConvertFrom-Json
$taskJson.version.Patch = $(Version)
$taskJson = $taskJson | ConvertTo-Json -Depth 10
Set-Content -Path $jsonPath -Value $taskJson | ConvertTo-Json
- task: PackageVSTSExtension@1
displayName: 'Package Extension - Private'
inputs:
rootFolder: '$(Build.SourcesDirectory)'
extensionVersion: '1.2.$(Version)'
extensionVisibility: private
extensionPricing: free
extensionId: 'CreatePullRequestDev'
outputPath: '$(Build.ArtifactStagingDirectory)/vsix'
- task: PackageVSTSExtension@1
displayName: 'Package Extension - Public'
inputs:
rootFolder: '$(Build.SourcesDirectory)'
extensionVersion: '1.2.$(Version)'
extensionVisibility: public
extensionPricing: free
updateTasksVersion: false
outputPath: '$(Build.ArtifactStagingDirectory)/vsix'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\vsix'