Skip to content

Commit

Permalink
[Localization] Add OneLocBuild job (#111)
Browse files Browse the repository at this point in the history
A new job has been added to run the `OneLocBuild@2` task on every commit
to main.  This task produces files needed by the localization team.  For
more details on this process, see the [OneLocBuild documentation][0].

[0]: https://aka.ms/OneLocBuild
  • Loading branch information
pjcollins authored Aug 9, 2022
1 parent bdfa9f8 commit 9aee99a
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 2 deletions.
14 changes: 14 additions & 0 deletions Localize/LocProject.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"Projects": [
{
"LanguageSet": "VS_Main_Languages",
"LocItems": [
{
"CopyOption": "LangIDOnName",
"SourceFile": ".\\LibZipSharp\\Properties\\Resources.resx",
"OutputPath": ".\\LibZipSharp\\Properties"
}
]
}
]
}
44 changes: 42 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ stages:
displayName: "Run Tests under .net Core"
inputs:
command: test
arguments: 'LibZipSharp.UnitTest\bin\Release\netcoreapp3.1\LibZipSharp.UnitTest.dll
'
arguments: 'LibZipSharp.UnitTest\bin\Release\netcoreapp3.1\LibZipSharp.UnitTest.dll'

- stage: Publish
dependsOn: Test
condition: eq(variables['System.TeamProject'], 'devdiv') # only sign the packages when running on Windows, and using the private server which has the certificates
Expand All @@ -267,3 +267,43 @@ stages:
parameters:
signListPath: 'SignList.xml'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')

- stage: Localization
dependsOn: []
condition: and(eq(variables['System.TeamProject'], 'DevDiv'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
jobs:
- job: OneLocBuild
displayName: OneLocBuild
pool: VSEngSS-MicroBuild2022-1ES
timeoutInMinutes: 30
variables:
- group: Xamarin-Secrets
workspace:
clean: all
steps:
- checkout: self
clean: true

- task: OneLocBuild@2
displayName: OneLocBuild
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
locProj: Localize/LocProject.json
outDir: $(Build.StagingDirectory)
packageSourceAuth: patAuth
patVariable: $(OneLocBuild--PAT)
isCreatePrSelected: true
repoType: gitHub
gitHubPatVariable: $(github--pat--vs-mobiletools-engineering-service2)
prSourceBranchPrefix: locpr
isShouldReusePrSelected: true
isAutoCompletePrSelected: false
isUseLfLineEndingsSelected: true

- task: PublishBuildArtifacts@1
displayName: Publish Localization Files
inputs:
PathtoPublish: $(Build.StagingDirectory)/loc
ArtifactName: Loc
condition: succeededOrFailed()

0 comments on commit 9aee99a

Please sign in to comment.