12
12
osx-build :
13
13
name : Build macOS
14
14
runs-on : macos-latest
15
+ strategy :
16
+ matrix :
17
+ runtime : [ osx-x64, osx-arm64 ]
15
18
steps :
16
19
- uses : actions/checkout@v3
17
20
with :
@@ -27,15 +30,19 @@ jobs:
27
30
28
31
- name : Build
29
32
run : |
30
- dotnet build --configuration=MacRelease
33
+ dotnet build src/osx/Installer.Mac/*.csproj \
34
+ --configuration=MacRelease --no-self-contained \
35
+ --runtime=${{ matrix.runtime }}
31
36
32
37
- name : Run macOS unit tests
33
38
run : |
34
39
dotnet test --configuration=MacRelease
35
40
36
41
- name : Lay out payload and symbols
37
42
run : |
38
- src/osx/Installer.Mac/layout.sh --configuration=MacRelease --output=payload --symbol-output=symbols
43
+ src/osx/Installer.Mac/layout.sh \
44
+ --configuration=MacRelease --output=payload \
45
+ --symbol-output=symbols --runtime=${{ matrix.runtime }}
39
46
40
47
- name : Create keychain
41
48
env :
58
65
- name : Upload macOS artifacts
59
66
uses : actions/upload-artifact@v3
60
67
with :
61
- name : tmp.osx -build
68
+ name : tmp.${{ matrix.runtime }} -build
62
69
path : |
63
70
payload
64
71
symbols
67
74
name : Sign macOS payload
68
75
# ESRP service requires signing to run on Windows
69
76
runs-on : windows-latest
77
+ strategy :
78
+ matrix :
79
+ runtime : [ osx-x64, osx-arm64 ]
70
80
needs : osx-build
71
81
steps :
72
82
- name : Check out repository
75
85
- name : Download payload
76
86
uses : actions/download-artifact@v3
77
87
with :
78
- name : tmp.osx -build
88
+ name : tmp.${{ matrix.runtime }} -build
79
89
80
90
- name : Zip unsigned payload
81
91
shell : pwsh
@@ -109,7 +119,9 @@ jobs:
109
119
APPLE_KEY_CODE : ${{ secrets.APPLE_KEY_CODE }}
110
120
APPLE_SIGNING_OP_CODE : ${{ secrets.APPLE_SIGNING_OPERATION_CODE }}
111
121
run : |
112
- python .github\run_esrp_signing.py payload $env:APPLE_KEY_CODE $env:APPLE_SIGNING_OP_CODE --params 'Hardening' '--options=runtime'
122
+ python .github\run_esrp_signing.py payload `
123
+ $env:APPLE_KEY_CODE $env:APPLE_SIGNING_OP_CODE `
124
+ --params 'Hardening' '--options=runtime'
113
125
114
126
- name : Unzip signed payload
115
127
shell : pwsh
@@ -120,13 +132,16 @@ jobs:
120
132
- name : Upload signed payload
121
133
uses : actions/upload-artifact@v3
122
134
with :
123
- name : osx -payload-sign
135
+ name : ${{ matrix.runtime }} -payload-sign
124
136
path : |
125
137
signed
126
138
127
139
osx-pack :
128
140
name : Package macOS payload
129
141
runs-on : macos-latest
142
+ strategy :
143
+ matrix :
144
+ runtime : [ osx-x64, osx-arm64 ]
130
145
needs : osx-payload-sign
131
146
steps :
132
147
- name : Check out repository
@@ -147,27 +162,34 @@ jobs:
147
162
- name : Download signed payload
148
163
uses : actions/download-artifact@v3
149
164
with :
150
- name : osx -payload-sign
165
+ name : ${{ matrix.runtime }} -payload-sign
151
166
152
167
- name : Create component package
153
168
run : |
154
- src/osx/Installer.Mac/pack.sh --payload=payload --version=$GitBuildVersionSimple --output=components/com.microsoft.gitcredentialmanager.component.pkg
169
+ src/osx/Installer.Mac/pack.sh --payload=payload \
170
+ --version=$GitBuildVersionSimple \
171
+ --output=components/com.microsoft.gitcredentialmanager.component.pkg
155
172
156
173
- name : Create product archive
157
174
run : |
158
- src/osx/Installer.Mac/dist.sh --package-path=components --version=$GitBuildVersionSimple --output=pkg/gcm-osx-x64-$GitBuildVersionSimple.pkg || exit 1
175
+ src/osx/Installer.Mac/dist.sh --package-path=components \
176
+ --version=$GitBuildVersionSimple --runtime=${{ matrix.runtime }} \
177
+ --output=pkg/gcm-${{ matrix.runtime }}-$GitBuildVersionSimple.pkg || exit 1
159
178
160
179
- name : Upload package
161
180
uses : actions/upload-artifact@v3
162
181
with :
163
- name : tmp.osx -pack
182
+ name : tmp.${{ matrix.runtime }} -pack
164
183
path : |
165
184
pkg
166
185
167
186
osx-sign :
168
187
name : Sign and notarize macOS package
169
188
# ESRP service requires signing to run on Windows
170
189
runs-on : windows-latest
190
+ strategy :
191
+ matrix :
192
+ runtime : [ osx-x64, osx-arm64 ]
171
193
needs : osx-pack
172
194
steps :
173
195
- name : Check out repository
@@ -176,7 +198,7 @@ jobs:
176
198
- name : Download unsigned package
177
199
uses : actions/download-artifact@v3
178
200
with :
179
- name : tmp.osx -pack
201
+ name : tmp.${{ matrix.runtime }} -pack
180
202
path : pkg
181
203
182
204
- name : Zip unsigned package
@@ -236,7 +258,7 @@ jobs:
236
258
- name : Publish signed package
237
259
uses : actions/upload-artifact@v3
238
260
with :
239
- name : osx -sign
261
+ name : ${{ matrix.runtime }} -sign
240
262
path : signed/*.pkg
241
263
242
264
# ================================
@@ -468,8 +490,12 @@ jobs:
468
490
- name : Archive macOS payload and symbols
469
491
run : |
470
492
mkdir osx-payload-and-symbols
471
- tar -C osx-payload-sign -czf osx-payload-and-symbols/gcm-osx-x64-$GitBuildVersionSimple.tar.gz .
472
- tar -C tmp.osx-build/symbols -czf osx-payload-and-symbols/gcm-osx-x64-$GitBuildVersionSimple-symbols.tar.gz .
493
+
494
+ tar -C osx-x64-payload-sign -czf osx-payload-and-symbols/gcm-osx-x64-$GitBuildVersionSimple.tar.gz .
495
+ tar -C tmp.osx-x64-build/symbols -czf osx-payload-and-symbols/gcm-osx-x64-$GitBuildVersionSimple-symbols.tar.gz .
496
+
497
+ tar -C osx-arm64-payload-sign -czf osx-payload-and-symbols/gcm-osx-arm64-$GitBuildVersionSimple.tar.gz .
498
+ tar -C tmp.osx-arm64-build/symbols -czf osx-payload-and-symbols/gcm-osx-arm64-$GitBuildVersionSimple-symbols.tar.gz .
473
499
474
500
- name : Archive Windows payload and symbols
475
501
shell : pwsh
@@ -527,7 +553,8 @@ jobs:
527
553
uploadDirectoryToRelease('win-x86-payload-and-symbols'),
528
554
529
555
// Upload macOS artifacts
530
- uploadDirectoryToRelease('osx-sign'),
556
+ uploadDirectoryToRelease('osx-x64-sign'),
557
+ uploadDirectoryToRelease('osx-arm64-sign'),
531
558
uploadDirectoryToRelease('osx-payload-and-symbols'),
532
559
533
560
// Upload Linux artifacts
0 commit comments