-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
73 lines (61 loc) · 2.62 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
# Submit new package to Microsoft Store
# Steps:
# download source code
# change version in manifest file
# restore package, build solution
# upload to store
trigger:
- master
pr: none #don't run build won pull requests
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'x86|x64|ARM'
buildConfiguration: 'Release'
appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages\\'
majorMinorBuildVer: "1.1"
buildNum: $[counter(variables['majorMinorBuildVer'], 0)] # this number increment with every build. Starts with 0, when majorMinor changes
versionOfApp: '$(majorMinorBuildVer).$(buildNum).0' #revision number has to be 0, otherwise it will drop the package in store.
jobs:
- job: Build
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: VersionAPPX@2 #just changes version in manifest file
inputs:
Path: '$(Build.SourcesDirectory)'
VersionNumber: '$(versionOfApp)'
InjectVersion: False
VersionRegex: '(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){3}'
OutputVersion: 'OutputedVersion'
- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always
/p:UapAppxPackageBuildMode=StoreUpload
/p:AppxPackageSigningEnabled=false' #store will sign package
configuration: '$(buildConfiguration)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
- job: Publish
dependsOn: Build #Run only when build succeeded
steps:
- task: DownloadBuildArtifacts@1
- task: store-publish@0
inputs:
serviceEndpoint: 'NaWinDevCenter'
appId: '9PH5NNZ5BXFQ'
metadataUpdateMethod: 'JsonMetadata'
metadataPath: '$(system.defaultworkingdirectory)\NoApp\Store\appMetadata' # path where storeListing exists (with images)
updateImages: true
packagePath: '$(Build.ArtifactStagingDirectory)\**\*.msixupload'
force: true #force will delete any in progess submission
skipPolling: true # if false, pipeline will finish after package is approved (or declined)
deletePackages: true
numberOfPackagesToKeep: '5'