mirror of
https://github.com/XFox111/GUTSchedule.git
synced 2026-04-22 06:58:01 +03:00
82 lines
2.5 KiB
YAML
82 lines
2.5 KiB
YAML
# Universal Windows Platform pipeline config
|
|
|
|
trigger:
|
|
branches:
|
|
include:
|
|
- master
|
|
paths:
|
|
exclude:
|
|
- '*'
|
|
include:
|
|
- changelogs/windows/*
|
|
|
|
pool:
|
|
vmImage: 'windows-latest'
|
|
|
|
variables:
|
|
buildConfiguration: 'Release'
|
|
outputDirectory: '$(build.binariesDirectory)/$(buildConfiguration)'
|
|
buildPlatform: 'x86|x64|ARM'
|
|
|
|
steps:
|
|
- task: NuGetToolInstaller@1
|
|
displayName: 'Install NuGet Tool'
|
|
|
|
- task: NuGetCommand@2
|
|
displayName: 'Restore Solution'
|
|
inputs:
|
|
restoreSolution: '**/*.sln'
|
|
|
|
- task: PowerShell@2
|
|
displayName: 'Update version number'
|
|
inputs:
|
|
targetType: 'inline'
|
|
script: |
|
|
(Get-Content Package.appxmanifest -encoding UTF8 | Out-String) -creplace '(?<=\bVersion=")[^"]*', "$(Get-Date -Format "yy")$((Get-Date).DayOfYear.ToString('000')).$(Build.BuildId).$($(Build.BuildNumber).ToString().Split('.')[1]).0" | set-content Package.appxmanifest -encoding UTF8
|
|
workingDirectory: '$(Build.SourcesDirectory)\GUT.Schedule\GUTSchedule.UWP'
|
|
|
|
- task: DownloadSecureFile@1
|
|
name: assoc
|
|
displayName: 'Downloading Store association data file'
|
|
inputs:
|
|
secureFile: 'PackageStoreAssociation.xml'
|
|
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy Store association data'
|
|
inputs:
|
|
Contents: '$(assoc.secureFilePath)'
|
|
TargetFolder: '$(Build.Repository.LocalPath)/GUTSchedule/GUTSchedule.UWP'
|
|
|
|
- task: DownloadSecureFile@1
|
|
name: cert
|
|
displayName: 'Downloading PFX certificate file'
|
|
inputs:
|
|
secureFile: 'GUTScheduleCert.pfx'
|
|
|
|
- task: VSBuild@1
|
|
inputs:
|
|
platform: 'x86'
|
|
solution: '**/**.UWP.csproj'
|
|
configuration: '$(buildConfiguration)'
|
|
msbuildArgs: '/p:AppxBundlePlatforms="$(buildPlatform)"
|
|
/p:AppxPackageDir="$(Build.ArtifactStagingDirectory)\AppxPackages"
|
|
/p:AppxBundle=Always
|
|
/p:UapAppxPackageBuildMode=StoreUpload
|
|
/p:AppxPackageSigningEnabled=true
|
|
/p:PackageCertificateKeyFile="$(cert.secureFilePath)"
|
|
/p:PackageCertificatePassword=$(certPassword)
|
|
/p:PackageCertificateThumbprint=""'
|
|
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy changelog to output'
|
|
inputs:
|
|
SourceFolder: '$(Build.SourcesDirectory)/changelogs'
|
|
Contents: '**'
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)/changelogs'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: 'Drop Artifact'
|
|
inputs:
|
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
|
ArtifactName: 'WindowsBundle'
|
|
publishLocation: 'Container' |