# [Template] Builds and publishes .unitypackages
parameters:
  version: '$(MRTKVersion)-$(Build.BuildNumber)'

steps:
- task: PowerShell@2
  displayName: 'Build .unitypackages'
  inputs:
    targetType: filePath
    filePath: ./scripts/packaging/unitypackage.ps1
    arguments: >
      -UnityDirectory ${Env:Unity2018.3.7f1}
      -OutputDirectory $(Build.ArtifactStagingDirectory)\build\unitypackages\output
      -RepoDirectory $(Get-Location)
      -LogDirectory $(Build.ArtifactStagingDirectory)\build\unitypackages\logs
      -PackageVersion ${{ parameters.version }}
      -Verbose
- task: PublishBuildArtifacts@1
  displayName: 'Publish .unitypackages'
  inputs:
    PathtoPublish: '$(Build.ArtifactStagingDirectory)\build\unitypackages\output'
    ArtifactName: 'mrtk-unitypackages'

# [Template] Builds and publishes .unitypackages
parameters:
  version: '$(MRTKVersion)-$(Build.BuildNumber)'

steps:
- task: PowerShell@2
  displayName: 'Build .unitypackages'
  inputs:
    targetType: filePath
    filePath: ./scripts/packaging/unitypackage.ps1
    arguments: >
      -UnityDirectory ${Env:$(Unity2018Version)}
      -OutputDirectory $(Build.ArtifactStagingDirectory)\build\unitypackages\output
      -RepoDirectory $(Get-Location)
      -LogDirectory $(Build.ArtifactStagingDirectory)\build\unitypackages\logs
      -PackageVersion ${{ parameters.version }}
      -Verbose
- task: PublishBuildArtifacts@1
  displayName: 'Publish .unitypackages'
  inputs:
    PathtoPublish: '$(Build.ArtifactStagingDirectory)\build\unitypackages\output'
    ArtifactName: 'mrtk-unitypackages'

Use variable instead of explicit Unity version
Use variable instead of explicit Unity version
