forked from WindowsAppCommunity/Quarrel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-release.yml
81 lines (69 loc) · 2.38 KB
/
azure-pipelines-release.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
# Universal Windows Platform
# Build a Universal Windows Platform project using Visual Studio.
# Add steps that test and distribute an app, save build artifacts, and more:
# https://aka.ms/yaml
trigger:
- release
pr: none
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'x86|x64|ARM'
buildConfiguration: 'Release'
appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages\\'
buildDir: '$(build.artifactStagingDirectory)\build\\'
steps:
- task: DownloadSecureFile@1
name: appCenterToken
inputs:
secureFile: 'AppCenter.json'
- task: DownloadSecureFile@1
name: appCenterInsiderToken
inputs:
secureFile: 'AppCenterInsider.json'
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
if(Test-Path Env:APP_CENTER_TOKEN_PATH){
Copy-Item $Env:APP_CENTER_TOKEN_PATH -Destination "$($Env:BUILD_SOURCESDIRECTORY)/src/Quarrel/Assets/Tokens/"
}
if(Test-Path Env:APP_CENTER_INSIDER_TOKEN_PATH){
Copy-Item $Env:APP_CENTER_INSIDER_TOKEN_PATH -Destination "$($Env:BUILD_SOURCESDIRECTORY)/src/Quarrel/Assets/Tokens/"
}
env:
APP_CENTER_TOKEN_PATH: $(appCenterToken.secureFilePath)
APP_CENTER_INSIDER_TOKEN_PATH: $(appCenterInsiderToken.secureFilePath)
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
[xml]$xmlDoc = Get-Content $(Build.SourcesDirectory)\src\Quarrel\Package.appxmanifest
$xmlDoc.Package.Identity.Name="38062AvishaiDernis.DiscordUWP"
$xmlDoc.Package.Properties.DisplayName="Quarrel"
$xmlDoc.Package.Applications.Application.VisualElements.DisplayName="Quarrel"
$xmlDoc.Save('$(Build.SourcesDirectory)\src\Quarrel\Package.appxmanifest')
failOnStderr: true
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
inputs:
solution: '$(solution)'
platform: 'x86'
configuration: '$(buildConfiguration)'
msbuildArgs: '/p:AppxBundlePlatforms="$(buildPlatform)"
/p:AppxPackageDir="$(appxPackageDir)"
/p:OutputPath="$(buildDir)"
/p:AppxBundle=Always
/p:UapAppxPackageBuildMode=StoreUpload
/t:Quarrel'
- task: store-publish@0
inputs:
serviceEndpoint: 'Store releases'
appId: '9NBRWJ777C8R'
packagePath: '$(appxPackageDir)\*.appxupload'
force: false
skipPolling: true