forked from AnyStatus/AnyStatus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
95 lines (74 loc) · 2.21 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: '3.1$(Rev:.r).0'
trigger:
branches:
include:
- main
paths:
include:
- src
exclude:
- '*.md'
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'x64'
buildConfiguration: 'Release'
appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages\\'
steps:
# package version
- powershell: |
[xml]$manifest=get-content ".\src\Apps\Windows\AnyStatus.Apps.Windows.Package\Package.appxmanifest"
$manifest.Package.Identity.Version=$Env:BUILD_BUILDNUMBER
$manifest.save(".\src\Apps\Windows\AnyStatus.Apps.Windows.Package\Package.appxmanifest")
# API version
- powershell: |
[xml]$manifest=get-content ".\src\Core\AnyStatus.API\AnyStatus.API.csproj"
$manifest.Project.PropertyGroup.PackageVersion=$Env:BUILD_BUILDNUMBER
$manifest.save(".\src\Core\AnyStatus.API\AnyStatus.API.csproj")
# app settings
- task: FileTransform@2
condition: succeededOrFailed()
inputs:
folderPath: '$(System.DefaultWorkingDirectory)'
jsonTargetFiles: '.\src\Apps\Windows\AnyStatus.Apps.Windows\appsettings.json'
# restore
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
# build
- task: VSBuild@1
inputs:
platform: 'x64'
solution: '$(solution)'
configuration: '$(buildConfiguration)'
msbuildArgs: '/p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=StoreUpload'
# test
- task: Windows Application Driver@0
inputs:
OperationType: 'Start'
AgentResolution: '1080p'
- task: VSTest@2
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\AnyStatus*.Tests.dll
!**\AnyStatus.Apps.Windows.Tests.dll
!**\*TestAdapter.dll
!**\obj\**
searchFolder: '$(System.DefaultWorkingDirectory)'
uiTests: true
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: Windows Application Driver@0
inputs:
OperationType: 'Stop'
condition: always()
# publish
- task: CopyFiles@2
inputs:
contents: '**/AnyStatus.API.*.nupkg'
targetFolder: $(Build.ArtifactStagingDirectory)
- publish: $(Build.ArtifactStagingDirectory)
artifact: AnyStatus