[Localization] Revert "[CI] Remove the translations from the main stage. (#17453)" (#17537)

We actually do need to keep this task inside our normal builds for the
Loc team to identify if there are new translations through the
localizationDrop artifact. The other pipeline that runs this task on the
cron job is used for a separate part of the localization process that
creates the PRs with the usable translations.

We re-add the job and provide a new parameter to ignore the translations (set to be true by default) that way other pipelines using the template can ignore the job.


https://github.com/xamarin/maccore/wiki/Localization#the-translation-process

---------

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
This commit is contained in:
TJ Lambert 2023-02-28 11:32:34 -06:00 коммит произвёл GitHub
Родитель ac1dad4dcc
Коммит 80fdc5871a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -32,6 +32,10 @@ parameters:
type: boolean
default: true
- name: runTranslations
type: boolean
default: true
- name: runSamples
type: boolean
default: false
@ -195,6 +199,19 @@ stages:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
- ${{ if and(eq(parameters.runTranslations, true), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}:
- job: translations
displayName: 'Loc translations'
pool:
vmImage: windows-latest
steps:
- template: loc-translations.yml
parameters:
isPR: ${{ parameters.isPR }}
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
- ${{ if parameters.isPR }}:
- stage: clean
displayName: '${{ parameters.stageDisplayNamePrefix }}Clean up'