Skip to content

Commit 07ffc10

Browse files
committed
.azure-pipelines/release.yml: add macOS builds
Add macOS release build definitions on Azure Pipelines. Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
1 parent 183aca9 commit 07ffc10

1 file changed

Lines changed: 150 additions & 0 deletions

File tree

.azure-pipelines/release.yml

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,22 @@ parameters:
3030
image: win-x86_64-ado1es
3131
os: windows
3232

33+
- name: macos_matrix
34+
type: object
35+
default:
36+
- id: macos_x64
37+
jobName: 'macOS (x64)'
38+
runtime: osx-x64
39+
pool: 'Azure Pipelines'
40+
image: macOS-latest
41+
os: macos
42+
- id: macos_arm64
43+
jobName: 'macOS (ARM64)'
44+
runtime: osx-arm64
45+
pool: 'Azure Pipelines'
46+
image: macOS-latest
47+
os: macos
48+
3349
variables:
3450
- name: 'esrpConnectionName'
3551
value: '1ESGitClient-ESRP'
@@ -204,3 +220,137 @@ extends:
204220
# "Parameters": {}
205221
# }
206222
# ]
223+
224+
#
225+
# macOS build jobs
226+
#
227+
- ${{ each dim in parameters.macos_matrix }}:
228+
- job: ${{ dim.id }}
229+
displayName: ${{ dim.jobName }}
230+
pool:
231+
name: ${{ dim.pool }}
232+
image: ${{ dim.image }}
233+
os: ${{ dim.os }}
234+
variables:
235+
version: $[stageDependencies.prebuild.vars.outputs['version.value']]
236+
templateContext:
237+
outputs:
238+
- output: pipelineArtifact
239+
targetPath: '$(Build.ArtifactStagingDirectory)/payload'
240+
artifactName: '${{ dim.runtime }}_payload'
241+
- output: pipelineArtifact
242+
targetPath: '$(Build.ArtifactStagingDirectory)/symbols'
243+
artifactName: '${{ dim.runtime }}_symbols'
244+
- output: pipelineArtifact
245+
targetPath: '$(Build.ArtifactStagingDirectory)/installers'
246+
artifactName: '${{ dim.runtime }}_installers'
247+
steps:
248+
- checkout: self
249+
- task: UseDotNet@2
250+
displayName: 'Use .NET 8 SDK'
251+
inputs:
252+
packageType: sdk
253+
version: '8.x'
254+
- task: Bash@3
255+
displayName: 'Build payload'
256+
inputs:
257+
targetType: filePath
258+
filePath: './src/osx/Installer.Mac/layout.sh'
259+
arguments: |
260+
--runtime="${{ dim.runtime }}" \
261+
--configuration="Release" \
262+
--output="$(Build.ArtifactStagingDirectory)/payload" \
263+
--symbol-output="$(Build.ArtifactStagingDirectory)/symbols"
264+
# - task: EsrpCodeSigning@5
265+
# condition: and(succeeded(), eq('${{ parameters.esrp }}', true))
266+
# displayName: 'Sign payload'
267+
# inputs:
268+
# connectedServiceName: '$(esrpConnectionName)'
269+
# appRegistrationClientId: '$(esrpClientId)'
270+
# appRegistrationTenantId: '$(esrpTenantId)'
271+
# authAkvName: '$(esrpAuthAkvName)'
272+
# authCertName: '$(esrpAuthCertName)'
273+
# authSignCertName: '$(esrpAuthSignCertName)'
274+
# serviceEndpointUrl: '$(esrpEndpointUrl)'
275+
# folderPath: '$(Build.ArtifactStagingDirectory)/payload'
276+
# pattern: '**/*'
277+
# signConfigType: inlineSignParams
278+
# inlineOperation: |
279+
# [
280+
# {
281+
# "KeyCode": "CP-401337-Apple",
282+
# "OperationCode": "MacAppDeveloperSign",
283+
# "ToolName": "sign",
284+
# "ToolVersion": "1.0",
285+
# "Parameters": {}
286+
# }
287+
# ]
288+
- task: Bash@3
289+
displayName: 'Build component package'
290+
inputs:
291+
targetType: filePath
292+
filePath: './src/osx/Installer.Mac/pack.sh'
293+
arguments: |
294+
--version="$(version)" \
295+
--payload="$(Build.ArtifactStagingDirectory)/payload" \
296+
--output="$(Build.ArtifactStagingDirectory)/pkg/com.microsoft.gitcredentialmanager.component.pkg"
297+
- task: Bash@3
298+
displayName: 'Build installer package'
299+
inputs:
300+
targetType: filePath
301+
filePath: './src/osx/Installer.Mac/dist.sh'
302+
arguments: |
303+
--version="$(version)" \
304+
--runtime="${{ dim.runtime }}" \
305+
--package-path="$(Build.ArtifactStagingDirectory)/pkg" \
306+
--output="$(Build.ArtifactStagingDirectory)/installers/gcm-${{ dim.runtime }}-$(version).pkg"
307+
# - task: EsrpCodeSigning@5
308+
# condition: and(succeeded(), eq('${{ parameters.esrp }}', true))
309+
# displayName: 'Sign installer package'
310+
# inputs:
311+
# connectedServiceName: '$(esrpConnectionName)'
312+
# appRegistrationClientId: '$(esrpClientId)'
313+
# appRegistrationTenantId: '$(esrpTenantId)'
314+
# authAkvName: '$(esrpAuthAkvName)'
315+
# authCertName: '$(esrpAuthCertName)'
316+
# authSignCertName: '$(esrpAuthSignCertName)'
317+
# serviceEndpointUrl: '$(esrpEndpointUrl)'
318+
# folderPath: '$(Build.ArtifactStagingDirectory)/installers'
319+
# pattern: '**/*'
320+
# signConfigType: inlineSignParams
321+
# inlineOperation: |
322+
# [
323+
# {
324+
# "KeyCode": "CP-233029-Apple",
325+
# "OperationCode": "MacAppThirdPartySign",
326+
# "ToolName": "sign",
327+
# "ToolVersion": "1.0",
328+
# "Parameters": {}
329+
# }
330+
# ]
331+
# - task: EsrpCodeSigning@5
332+
# condition: and(succeeded(), eq('${{ parameters.esrp }}', true))
333+
# displayName: 'Notarize installer package'
334+
# inputs:
335+
# connectedServiceName: '$(esrpConnectionName)'
336+
# appRegistrationClientId: '$(esrpClientId)'
337+
# appRegistrationTenantId: '$(esrpTenantId)'
338+
# authAkvName: '$(esrpAuthAkvName)'
339+
# authCertName: '$(esrpAuthCertName)'
340+
# authSignCertName: '$(esrpAuthSignCertName)'
341+
# serviceEndpointUrl: '$(esrpEndpointUrl)'
342+
# folderPath: '$(Build.ArtifactStagingDirectory)/installers'
343+
# pattern: '**/*'
344+
# signConfigType: inlineSignParams
345+
# inlineOperation: |
346+
# [
347+
# {
348+
# "KeyCode": "CP-401337-Apple",
349+
# "OperationCode": "MacAppNotarize",
350+
# "ToolName": "sign",
351+
# "ToolVersion": "1.0",
352+
# "Parameters": {
353+
# "BundleId": "com.microsoft.gitcredentialmanager"
354+
# }
355+
# }
356+
# ]

0 commit comments

Comments
 (0)