Last active
June 14, 2019 07:24
-
-
Save SakaITa/c95e18758b9b055546a2f2a66d9e2b85 to your computer and use it in GitHub Desktop.
Azure DevOps Pipelines for HoloLens app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2019 SakaIT | |
# Released under the MIT license | |
# https://gist.github.com/SakaITa/f56d3fa36f567205f21f7816489b82a7 | |
trigger: | |
- master | |
pool: | |
vmImage: 'vs2017-win2016' | |
variables: | |
unityProjectPath: '.' | |
steps: | |
- task: UnityGetProjectVersionTask@1 | |
displayName: 'Unity Get Project Version' | |
name: unityGetProjectVersion | |
inputs: | |
unityProjectPath: '$(unityProjectPath)' | |
- task: PowerShell@2 | |
displayName: 'Install UnitySetup.PowerShell module' | |
inputs: | |
targetType: 'inline' | |
script: 'Install-Module -Name UnitySetup -AllowPrerelease -Scope CurrentUser -Force' | |
failOnStderr: true | |
- task: PowerShell@2 | |
displayName: 'Install Unity Editor' | |
inputs: | |
targetType: 'inline' | |
script: 'Install-UnitySetupInstance -Installers (Find-UnitySetupInstaller -Version ''$(unitygetprojectversion.projectVersion)'' -Components Windows,UWP,UWP_IL2CPP) -Verbose' | |
- task: UnityActivateLicenseTask@1 | |
displayName: 'Unity Activate License' | |
inputs: | |
username: '$(unityLicense.userName)' | |
password: '$(unityLicense.password)' | |
serial: '$(unityLicense.serial)' | |
unityEditorsPathMode: 'unityHub' | |
unityProjectPath: '$(unityProjectPath)' | |
- task: UnityBuildTask@2 | |
displayName: 'Unity Build WindowsStoreApps' | |
name: 'unityBuild' | |
inputs: | |
buildTarget: 'WindowsStoreApps' | |
unityEditorsPathMode: 'unityHub' | |
unityProjectPath: '$(unityProjectPath)' | |
commandLineArgumentsMode: 'default' | |
- task: NuGetToolInstaller@1 | |
displayName: 'Use NuGet 4.3.0' | |
inputs: | |
versionSpec: '4.3.0' | |
- task: NuGetCommand@2 | |
displayName: 'NuGet restore' | |
inputs: | |
command: 'restore' | |
restoreSolution: '$(unityBuild.buildOutputPath)\*.sln' | |
feedsToUse: 'select' | |
- task: VSBuild@1 | |
displayName: 'Build solution $(unityBuild.buildOutputPath)\*.sln' | |
inputs: | |
solution: '$(unityBuild.buildOutputPath)\*.sln' | |
vsVersion: '15.0' | |
msbuildArgs: '/p:AppxBundle=Always;AppxBundlePlatforms="x86"' | |
platform: 'x86' | |
configuration: 'release' | |
- task: CopyFiles@2 | |
displayName: 'Copy AppPackages' | |
inputs: | |
SourceFolder: '$(unityBuild.buildOutputPath)' | |
Contents: '**\AppPackages\**' | |
TargetFolder: '$(Build.ArtifactStagingDirectory)' | |
- task: PublishBuildArtifacts@1 | |
displayName: 'Publish Artifact: drop' | |
inputs: | |
PathtoPublish: '$(Build.ArtifactStagingDirectory)' | |
ArtifactName: 'drop' | |
publishLocation: 'Container' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment