-
Notifications
You must be signed in to change notification settings - Fork 25
/
azure-pipelines.yml
57 lines (49 loc) · 1.71 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
49
50
51
52
53
54
55
56
57
name: $(Build.DefinitionName) $(date:yyyyMMdd)$(rev:.r)
pool:
vmImage: 'windows-latest'
demands:
- msbuild
- vstest
variables:
BuildPlatform: 'Any CPU'
BuildConfiguration: 'Release'
steps:
- task: PowerShell@1
displayName: 'Set build version'
inputs:
scriptType: inlineScript
inlineScript: |
(new-object Net.WebClient).DownloadString("https://raw.github.com/tom-englert/BuildScripts/master/BuildScripts.ps1") | iex
$version = Project-SetVersion "Directory.Build.props"
$version | Build-AppendVersionToBuildNumber
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
- task: VSBuild@1
displayName: 'Build solution'
inputs:
solution: 'wax.sln'
vsVersion: '16.0'
msbuildArgs: '-restore'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
createLogFile: true
- task: CopyFiles@1
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
inputs:
SourceFolder: '$(build.sourcesdirectory)'
Contents: '**\bin\$(BuildConfiguration)\**\*.vsix'
TargetFolder: '$(build.artifactstagingdirectory)'
flattenFolders: true
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: VSIX'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)\wax.vsix'
ArtifactName: VSIX
- task: PowerShell@1
displayName: 'Publish to vsix-gallery'
inputs:
scriptType: inlineScript
inlineScript: |
(new-object Net.WebClient).DownloadString("https://raw.github.com/tom-englert/BuildScripts/master/BuildScripts.ps1") | iex
Vsix-PublishToGallery "$(build.artifactstagingdirectory)\wax.vsix"
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))