trigger: none

pr: none

pool:
  vmImage: 'windows-latest'

steps:
- checkout: self
  # Use the OAuth token in the Git config for localized file check-in, refer to https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/steps-checkout?view=azure-pipelines.
  persistCredentials: true

- task: OneLocBuild@3
  inputs:
    locProj: 'localization/LocProject.json'
    outDir: '$(Build.ArtifactStagingDirectory)'
    repoType: gitHub
    # Create a PR to check-in resulting localized files to the repo & branch.
    isCreatePrSelected: true
    # Reuse an existing active pull request for localized file check-in whenever possible, rather than creating a new one.
    isShouldReusePrSelected: true
    # Automatically complete a PR for automated localized file check-in skipping a review.
    isAutoCompletePrSelected: false
    gitHubPrMergeMethod: squash
    isDeletePrSourceBranchSelected: false

    prSourceBranchPrefix: 'locfiles'
    packageSourceAuth: patAuth
    # Provide the dependency packages required by OneLocBuild. Replace with your feed which has 'azure-feed://ceapex/LocTools@Local' as an upstream source.
    dependencyPackageSource: 'https://pkgs.dev.azure.com/msdata/5603b9e3-ece0-4518-b9c8-1a36054d9970/_packaging/pgtoolsservice_PublicPackages/nuget/v3/index.json'
    # Use the predefined variable to install the dependency packages from your feed. It maps to 'Project Collection Build Service ({organization name})' or '{project name} Build Service ({organization name})', which should be assigned to the 'Feed and Upstream Reader (Collaborator)' role in the feed.
    patVariable: '$(System.AccessToken)'

- task: PublishPipelineArtifact@1
  inputs:
    targetPath: '$(Build.ArtifactStagingDirectory)'
    artifact: 'drop'