Skip to content

Commit 9aee99a

Browse files
authored
[Localization] Add OneLocBuild job (#111)
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
1 parent bdfa9f8 commit 9aee99a

File tree

2 files changed

+56
-2
lines changed

2 files changed

+56
-2
lines changed

Localize/LocProject.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"Projects": [
3+
{
4+
"LanguageSet": "VS_Main_Languages",
5+
"LocItems": [
6+
{
7+
"CopyOption": "LangIDOnName",
8+
"SourceFile": ".\\LibZipSharp\\Properties\\Resources.resx",
9+
"OutputPath": ".\\LibZipSharp\\Properties"
10+
}
11+
]
12+
}
13+
]
14+
}

azure-pipelines.yml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ stages:
257257
displayName: "Run Tests under .net Core"
258258
inputs:
259259
command: test
260-
arguments: 'LibZipSharp.UnitTest\bin\Release\netcoreapp3.1\LibZipSharp.UnitTest.dll
261-
'
260+
arguments: 'LibZipSharp.UnitTest\bin\Release\netcoreapp3.1\LibZipSharp.UnitTest.dll'
261+
262262
- stage: Publish
263263
dependsOn: Test
264264
condition: eq(variables['System.TeamProject'], 'devdiv') # only sign the packages when running on Windows, and using the private server which has the certificates
@@ -267,3 +267,43 @@ stages:
267267
parameters:
268268
signListPath: 'SignList.xml'
269269
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
270+
271+
- stage: Localization
272+
dependsOn: []
273+
condition: and(eq(variables['System.TeamProject'], 'DevDiv'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
274+
jobs:
275+
- job: OneLocBuild
276+
displayName: OneLocBuild
277+
pool: VSEngSS-MicroBuild2022-1ES
278+
timeoutInMinutes: 30
279+
variables:
280+
- group: Xamarin-Secrets
281+
workspace:
282+
clean: all
283+
steps:
284+
- checkout: self
285+
clean: true
286+
287+
- task: OneLocBuild@2
288+
displayName: OneLocBuild
289+
env:
290+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
291+
inputs:
292+
locProj: Localize/LocProject.json
293+
outDir: $(Build.StagingDirectory)
294+
packageSourceAuth: patAuth
295+
patVariable: $(OneLocBuild--PAT)
296+
isCreatePrSelected: true
297+
repoType: gitHub
298+
gitHubPatVariable: $(github--pat--vs-mobiletools-engineering-service2)
299+
prSourceBranchPrefix: locpr
300+
isShouldReusePrSelected: true
301+
isAutoCompletePrSelected: false
302+
isUseLfLineEndingsSelected: true
303+
304+
- task: PublishBuildArtifacts@1
305+
displayName: Publish Localization Files
306+
inputs:
307+
PathtoPublish: $(Build.StagingDirectory)/loc
308+
ArtifactName: Loc
309+
condition: succeededOrFailed()

0 commit comments

Comments
 (0)