79
79
80
80
- uses : actions/upload-artifact@v4
81
81
with :
82
- name : artifact -bin-macos-${{ matrix.arch }}
82
+ name : unsigned -bin-macos-${{ matrix.arch }}
83
83
path : sentry-cli-Darwin-${{ matrix.arch }}
84
84
if-no-files-found : ' error'
85
85
@@ -91,18 +91,88 @@ jobs:
91
91
steps :
92
92
- uses : actions/download-artifact@v4
93
93
with :
94
- pattern : artifact -bin-macos-*
94
+ pattern : unsigned -bin-macos-*
95
95
merge-multiple : true
96
96
97
97
- name : Link universal binary
98
98
run : lipo -create -output sentry-cli-Darwin-universal sentry-cli-Darwin-x86_64 sentry-cli-Darwin-arm64
99
99
100
100
- uses : actions/upload-artifact@v4
101
101
with :
102
- name : artifact -bin-macos-universal
102
+ name : unsigned -bin-macos-universal
103
103
path : sentry-cli-Darwin-universal
104
104
if-no-files-found : ' error'
105
105
106
+ sign-macos-binaries :
107
+ strategy :
108
+ fail-fast : false
109
+ matrix :
110
+ include :
111
+ - arch : universal
112
+ - arch : x86_64
113
+ - arch : arm64
114
+
115
+ needs : [macos, macos_universal]
116
+ name : Sign & Notarize macOS Binary (${{ matrix.arch }})
117
+ runs-on : ubuntu-24.04
118
+
119
+ env :
120
+ APPLE_CERT_PATH : /tmp/certs.p12
121
+ APPLE_API_KEY_PATH : /tmp/apple_key.json
122
+
123
+ steps :
124
+ - name : Checkout repository
125
+ uses : actions/checkout@v4
126
+
127
+ - name : Install `rcodesign`
128
+ run : |
129
+ curl -L https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.29.0/apple-codesign-0.29.0-x86_64-unknown-linux-musl.tar.gz \
130
+ -o rcodesign.tar.gz
131
+ echo "dbe85cedd8ee4217b64e9a0e4c2aef92ab8bcaaa41f20bde99781ff02e600002 rcodesign.tar.gz" | sha256sum -c -
132
+ tar -xz --strip-components=1 -f rcodesign.tar.gz
133
+ mv rcodesign /usr/local/bin/rcodesign
134
+ rm rcodesign.tar.gz
135
+
136
+ - name : Decode Apple signing certificate and API key
137
+ env :
138
+ APPLE_CERT_DATA : ${{ secrets.APPLE_CERT_DATA }}
139
+ APPLE_API_KEY : ${{ secrets.APPLE_API_KEY }}
140
+ run : |
141
+ echo "$APPLE_CERT_DATA" | base64 --decode > ${{ env.APPLE_CERT_PATH }}
142
+ echo "$APPLE_API_KEY" | base64 --decode > ${{ env.APPLE_API_KEY_PATH }}
143
+
144
+ - name : Download unsigned binary
145
+ uses : actions/download-artifact@v4
146
+ with :
147
+ name : unsigned-bin-macos-${{ matrix.arch }}
148
+
149
+ - name : Sign binary
150
+ run : |
151
+ rcodesign sign \
152
+ --for-notarization \
153
+ --entitlements-xml-path entitlements.plist \
154
+ --p12-file ${{ env.APPLE_CERT_PATH }} \
155
+ --p12-password ${{ secrets.APPLE_CERT_PASSWORD }} \
156
+ sentry-cli-Darwin-${{ matrix.arch }}
157
+
158
+ - name : Zip signed binary
159
+ run : |
160
+ zip sentry-cli-Darwin-${{ matrix.arch }}.zip sentry-cli-Darwin-${{ matrix.arch }}
161
+
162
+ - name : Notarize binary
163
+ run : |
164
+ rcodesign notary-submit \
165
+ --api-key-file ${{ env.APPLE_API_KEY_PATH }} \
166
+ --wait \
167
+ sentry-cli-Darwin-${{ matrix.arch }}.zip
168
+
169
+ - name : Upload signed binary
170
+ uses : actions/upload-artifact@v4
171
+ with :
172
+ name : artifact-bin-macos-${{ matrix.arch }}
173
+ path : sentry-cli-Darwin-${{ matrix.arch }}
174
+ if-no-files-found : ' error'
175
+
106
176
windows :
107
177
strategy :
108
178
fail-fast : false
@@ -198,7 +268,7 @@ jobs:
198
268
python :
199
269
name : python
200
270
runs-on : ubuntu-24.04
201
- needs : [linux, macos, macos_universal , windows, python-base]
271
+ needs : [linux, sign- macos-binaries , windows, python-base]
202
272
steps :
203
273
- uses : actions/checkout@v3
204
274
- uses : actions/setup-python@v4
@@ -224,7 +294,7 @@ jobs:
224
294
npm-distributions :
225
295
name : ' Build NPM distributions'
226
296
runs-on : ubuntu-24.04
227
- needs : [linux, macos, macos_universal , windows]
297
+ needs : [linux, sign- macos-binaries , windows]
228
298
steps :
229
299
- uses : actions/checkout@v3
230
300
- uses : actions/setup-node@v4
@@ -322,7 +392,7 @@ jobs:
322
392
merge :
323
393
name : Create Release Artifact
324
394
runs-on : ubuntu-24.04
325
- needs : [linux, macos, macos_universal , windows, npm-distributions, node, python]
395
+ needs : [linux, sign- macos-binaries , windows, npm-distributions, node, python]
326
396
steps :
327
397
- uses : actions/upload-artifact/merge@v4
328
398
with :
0 commit comments