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,75 @@ 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
+ matrix :
109
+ include :
110
+ - arch : universal
111
+ - arch : x86_64
112
+ - arch : arm64
113
+
114
+ needs : [macos, macos_universal]
115
+ name : Sign & Notarize macOS Binary (${{ matrix.arch }})
116
+ runs-on : ubuntu-24.04
117
+
118
+ env :
119
+ APPLE_CERT_PATH : /tmp/certs.p12
120
+ APPLE_API_KEY_PATH : /tmp/apple_key.json
121
+
122
+ steps :
123
+ - name : Decode Apple signing certificate and API key
124
+ env :
125
+ APPLE_CERT_DATA : ${{ secrets.APPLE_CERT_DATA }}
126
+ APPLE_API_KEY : ${{ secrets.APPLE_API_KEY }}
127
+ run : |
128
+ echo $APPLE_CERT_DATA | base64 --decode > ${{ env.APPLE_CERT_PATH }}
129
+ echo $APPLE_API_KEY | base64 --decode > ${{ env.APPLE_API_KEY_PATH }}
130
+
131
+ - name : Download unsigned binary
132
+ uses : actions/download-artifact@v4
133
+ with :
134
+ name : unsigned-bin-macos-${{ matrix.arch }}
135
+ path : sentry-cli-Darwin-${{ matrix.arch }}
136
+
137
+ - name : Sign binary
138
+ uses : indygreg/apple-code-sign-action@v1
139
+ with :
140
+ input_path : sentry-cli-Darwin-${{ matrix.arch }}
141
+ p12_file : ${{ env.APPLE_CERT_PATH }}
142
+ p12_password : ${{ secrets.APPLE_CERT_PASSWORD }}
143
+
144
+ - name : Zip signed binary
145
+ run : |
146
+ zip sentry-cli-Darwin-${{ matrix.arch }}.zip sentry-cli-Darwin-${{ matrix.arch }}
147
+
148
+ - name : Notarize binary
149
+ uses : indygreg/apple-code-sign-action@v1
150
+ with :
151
+ input_path : sentry-cli-Darwin-${{ matrix.arch }}.zip
152
+ sign : false
153
+ notarize : true
154
+ app_store_connect_api_key_json_file : ${{ env.APPLE_API_KEY_PATH }}
155
+
156
+ - name : Upload signed binary
157
+ uses : actions/upload-artifact@v4
158
+ with :
159
+ name : artifact-bin-macos-${{ matrix.arch }}
160
+ path : sentry-cli-Darwin-${{ matrix.arch }}.zip
161
+ if-no-files-found : ' error'
162
+
106
163
windows :
107
164
strategy :
108
165
fail-fast : false
0 commit comments