-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathazure-pipelines.yml
69 lines (59 loc) · 2.02 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
58
59
60
61
62
63
64
65
66
67
68
pool:
vmImage: 'windows-latest'
variables:
solution: 'src/Nullable.Extended.sln'
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
Project-SetVersion "src\Directory.Build.props" | Build-AppendVersionToBuildNumber
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
- task: VSBuild@1
displayName: Build
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
msbuildArgs: '-restore'
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: 'test'
projects: '$(solution)'
arguments: '--no-build --configuration $(buildConfiguration)'
- task: CopyFiles@2
inputs:
SourceFolder: 'src'
Contents: '**\$(buildConfiguration)\*.nupkg'
TargetFolder: '$(Build.ArtifactStagingDirectory)\Nuget'
flattenFolders: true
- task: CopyFiles@2
inputs:
SourceFolder: 'src'
Contents: '**\$(buildConfiguration)\**\*.vsix'
TargetFolder: '$(Build.ArtifactStagingDirectory)\Vsix'
flattenFolders: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\Nuget'
ArtifactName: 'Package'
publishLocation: 'Container'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\Vsix'
ArtifactName: 'Vsix'
publishLocation: 'Container'
- task: PowerShell@1
displayName: 'Publish to vsix-gallery'
enabled: 'true'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
scriptType: inlineScript
inlineScript: |
(new-object Net.WebClient).DownloadString("https://raw.github.com/tom-englert/BuildScripts/master/BuildScripts.ps1") | iex
Vsix-PublishToGallery "$(Build.ArtifactStagingDirectory)\Vsix\Nullable.Extended.Extension.vsix"