-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines-release.yaml
71 lines (61 loc) · 1.99 KB
/
azure-pipelines-release.yaml
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
69
70
71
parameters:
- name: Version
displayName: The version of the Visual Studio Templates
type: string
default: 1.1.2.0
trigger: none
pool:
vmImage: windows-latest
variables:
Configuration: Debug
Platform: Any CPU
Solution: PosInformatique.VisualStudio.Templates.sln
jobs:
- job: Build
displayName: Build the Visual Studio Templates
steps:
- task: PowerShell@2
name: UpdateBuildNumber
displayName: Update build number
inputs:
targetType: 'inline'
script: 'Write-Host "##vso[build.updatebuildnumber]${{parameters.Version}}"'
- task: NuGetToolInstaller@1
displayName: Install NuGet
- task: NuGetCommand@2
displayName: Restore NuGet packages
inputs:
command: 'restore'
restoreSolution: '$(Solution)'
feedsToUse: 'select'
- task: MSBuild@1
displayName: Build Visual Studio Templates
inputs:
solution: 'VisualStudio.Templates.package.proj'
msbuildArguments: '
/t:Publish
/p:Version=${{parameters.Version}}
/p:OutDir="$(Build.BinariesDirectory)"
/p:PublishUrl="https://$(WebAppName).azurewebsites.net/visualstudio-extensions/"'
msbuildArchitecture: 'x64'
platform: '$(Platform)'
configuration: '$(Configuration)'
- task: CopyFiles@2
displayName: Prepares Visual Studio Templates to be published
inputs:
SourceFolder: '$(Build.BinariesDirectory)/PosInformatique Visual Studio Templates'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)/visualstudio-extensions/'
- task: AzureRmWebAppDeployment@4
displayName: Publish the Visual Studio Templates
inputs:
ConnectionType: 'AzureRM'
azureSubscription: '$(AzureSubscription)'
appType: 'webApp'
WebAppName: '$(WebAppName)'
packageForLinux: '$(Build.ArtifactStagingDirectory)/'
enableCustomDeployment: true
DeploymentType: 'webDeploy'
TakeAppOfflineFlag: false
RemoveAdditionalFilesFlag: true
ExcludeFilesFromAppDataFlag: false