Skip to content

Commit 55aba2c

Browse files
committed
macos: add macOS release build for AzPipelines
Add an incomplete build stage for macOS. ESRP is not yet enabled. Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
1 parent 2f30ca2 commit 55aba2c

1 file changed

Lines changed: 127 additions & 4 deletions

File tree

.azure-pipelines/release.yml

Lines changed: 127 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ extends:
4141
image: win-x86_64-ado1es
4242
os: windows
4343
stages:
44-
- stage: windows
45-
displayName: 'Windows'
44+
- stage: build
45+
displayName: 'Build and Sign'
4646
jobs:
4747
- job: win_x86_build
48-
displayName: 'Windows Build and Sign (x86)'
48+
displayName: 'Windows (x86)'
4949
pool:
5050
name: GitClient-1ESHostedPool-intel-pc
5151
image: win-x86_64-ado1es
@@ -55,6 +55,9 @@ extends:
5555
- output: pipelineArtifact
5656
targetPath: '$(Build.ArtifactStagingDirectory)\payload'
5757
artifactName: 'win-x86_payload'
58+
- output: pipelineArtifact
59+
targetPath: '$(Build.ArtifactStagingDirectory)\symbols'
60+
artifactName: 'win-x86_symbols'
5861
- output: pipelineArtifact
5962
targetPath: '$(Build.ArtifactStagingDirectory)\installers'
6063
artifactName: 'win-x86_installers'
@@ -158,4 +161,124 @@ extends:
158161
# "toolName": "sign",
159162
# "toolVersion": "1.0"
160163
# }
161-
# ]
164+
# ]
165+
166+
- job: macos_x64_build
167+
displayName: 'macOS (x64)'
168+
pool:
169+
name: 'Azure Pipelines'
170+
image: macOS-latest
171+
os: macOS
172+
templateContext:
173+
outputs:
174+
- output: pipelineArtifact
175+
targetPath: '$(Build.ArtifactStagingDirectory)/payload'
176+
artifactName: 'osx-x64_payload'
177+
- output: pipelineArtifact
178+
targetPath: '$(Build.ArtifactStagingDirectory)/symbols'
179+
artifactName: 'osx-x64_symbols'
180+
- output: pipelineArtifact
181+
targetPath: '$(Build.ArtifactStagingDirectory)/installers'
182+
artifactName: 'osx-x64_installers'
183+
steps:
184+
- checkout: self
185+
- task: Bash@3
186+
displayName: 'Get version'
187+
inputs:
188+
targetType: inline
189+
script: |
190+
echo "##vso[task.setvariable variable=VERSION]$(cat ./VERSION)"
191+
- task: UseDotNet@2
192+
displayName: 'Use .NET 8 SDK'
193+
inputs:
194+
packageType: sdk
195+
version: '8.x'
196+
- task: Bash@3
197+
displayName: 'Build payload'
198+
inputs:
199+
targetType: filePath
200+
filePath: './src/osx/Installer.Mac/layout.sh'
201+
arguments: |
202+
--runtime="osx-x64" \
203+
--configuration="Release" \
204+
--output="$(Build.ArtifactStagingDirectory)/payload" \
205+
--symbol-output="$(Build.ArtifactStagingDirectory)/symbols"
206+
- task: Bash@3
207+
displayName: 'Build component package'
208+
inputs:
209+
targetType: filePath
210+
filePath: './src/osx/Installer.Mac/pack.sh'
211+
arguments: |
212+
--version="$(VERSION)" \
213+
--payload="$(Build.ArtifactStagingDirectory)/payload" \
214+
--output="$(Build.ArtifactStagingDirectory)/pkg/com.microsoft.gitcredentialmanager.component.pkg"
215+
- task: Bash@3
216+
displayName: 'Build installer package'
217+
inputs:
218+
targetType: filePath
219+
filePath: './src/osx/Installer.Mac/dist.sh'
220+
arguments: |
221+
--version="$(VERSION)" \
222+
--runtime="osx-x64" \
223+
--package-path="$(Build.ArtifactStagingDirectory)/pkg" \
224+
--output="$(Build.ArtifactStagingDirectory)/installers/gcm-osx-x64-$(VERSION).pkg"
225+
226+
- job: macos_arm64_build
227+
displayName: 'macOS (ARM64)'
228+
pool:
229+
name: 'Azure Pipelines'
230+
image: macOS-latest
231+
os: macOS
232+
templateContext:
233+
outputs:
234+
- output: pipelineArtifact
235+
targetPath: '$(Build.ArtifactStagingDirectory)/payload'
236+
artifactName: 'osx-arm64_payload'
237+
- output: pipelineArtifact
238+
targetPath: '$(Build.ArtifactStagingDirectory)/symbols'
239+
artifactName: 'osx-arm64_symbols'
240+
- output: pipelineArtifact
241+
targetPath: '$(Build.ArtifactStagingDirectory)/installers'
242+
artifactName: 'osx-arm64_installers'
243+
steps:
244+
- checkout: self
245+
- task: Bash@3
246+
displayName: 'Get version'
247+
inputs:
248+
targetType: inline
249+
script: |
250+
echo "##vso[task.setvariable variable=VERSION]$(cat ./VERSION)"
251+
- task: UseDotNet@2
252+
displayName: 'Use .NET 8 SDK'
253+
inputs:
254+
packageType: sdk
255+
version: '8.x'
256+
- task: Bash@3
257+
displayName: 'Build payload'
258+
inputs:
259+
targetType: filePath
260+
filePath: './src/osx/Installer.Mac/layout.sh'
261+
arguments: |
262+
--runtime="osx-arm64" \
263+
--configuration="Release" \
264+
--output="$(Build.ArtifactStagingDirectory)/payload" \
265+
--symbol-output="$(Build.ArtifactStagingDirectory)/symbols"
266+
- task: Bash@3
267+
displayName: 'Build component package'
268+
inputs:
269+
targetType: filePath
270+
filePath: './src/osx/Installer.Mac/pack.sh'
271+
arguments: |
272+
--version="$(VERSION)" \
273+
--payload="$(Build.ArtifactStagingDirectory)/payload" \
274+
--output="$(Build.ArtifactStagingDirectory)/pkg/com.microsoft.gitcredentialmanager.component.pkg"
275+
- task: Bash@3
276+
displayName: 'Build installer package'
277+
inputs:
278+
targetType: filePath
279+
filePath: './src/osx/Installer.Mac/dist.sh'
280+
arguments: |
281+
--version="$(VERSION)" \
282+
--runtime="osx-arm64" \
283+
--package-path="$(Build.ArtifactStagingDirectory)/pkg" \
284+
--output="$(Build.ArtifactStagingDirectory)/installers/gcm-osx-arm64-$(VERSION).pkg"

0 commit comments

Comments
 (0)