-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
azure-pipelines.yml
55 lines (46 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
pool:
vmImage: 'windows-2022'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
productName: 'RegionToShare'
appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages'
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 "src\Directory.Build.props"
$version | Build-AppendVersionToBuildNumber
[xml]$manifest= get-content ".\src\Packaging\Package.appxmanifest"
$manifest.Package.Identity.Version = $version + ".0"
$manifest.save(".\src\Packaging\Package.appxmanifest")
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
msbuildArgs: /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=StoreUpload /p:AppxPackageSigningEnabled=false'
- task: CopyFiles@2
inputs:
Contents: 'src/RegionToShare/bin/$(buildConfiguration)/net462/*.*'
TargetFolder: '$(build.artifactstagingdirectory)/bin'
flattenFolders: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/bin'
ArtifactName: '$(productName)'
publishLocation: 'Container'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(appxPackageDir)'
ArtifactName: 'Package'
publishLocation: 'Container'