24
24
APPLE_CERTIFICATE_PASSWORD : codex-test-password
25
25
# SHA-1 fingerprint of the test certificate; codesign accepts this format.
26
26
APPLE_CODESIGN_IDENTITY : 4E7E4C6F30634C3C9E308723F109FE7C83C061ED
27
- CODESIGN_DEBUG : false
27
+ CODESIGN_DEBUG : true
28
28
29
29
jobs :
30
30
tag-check :
60
60
build :
61
61
# DO NOT SUBMIT
62
62
# needs: tag-check
63
- name : ${{ matrix.runner }} - ${{ matrix.target }}
63
+ name : build step - ${{ matrix.runner }} - ${{ matrix.target }}
64
64
runs-on : ${{ matrix.runner }}
65
65
timeout-minutes : 30
66
66
defaults :
@@ -136,6 +136,7 @@ jobs:
136
136
fi
137
137
138
138
# TODO: we will be directly using the p12 from github secrets
139
+ # We would still write this to a path for easier importing
139
140
cert_path="${RUNNER_TEMP}/apple_signing_certificate.p12"
140
141
echo "$APPLE_CERTIFICATE" | base64 -d > "$cert_path"
141
142
@@ -162,10 +163,10 @@ jobs:
162
163
163
164
if [[ "${CODESIGN_DEBUG:-}" == "true" ]]; then
164
165
echo "::group::Imported signing identities"
165
- # TODO: we will need to grab the identity from this and then use it in the next step
166
- # TODO: WE DEFINITELY NEED TO GET RID OF THOSE
167
- security find-identity -v -p codesigning "$keychain_path" || true
168
- security find-certificate -a -Z "$keychain_path" || true
166
+ # TODO: we will need to grab the identity from this and then use it in the next step
167
+ # TODO: WE DEFINITELY NEED TO GET RID OF THOSE
168
+ security find-identity -v -p codesigning "$keychain_path" || true
169
+ security find-certificate -a -Z "$keychain_path" || true
169
170
echo "::endgroup::"
170
171
fi
171
172
@@ -185,7 +186,7 @@ jobs:
185
186
fi
186
187
187
188
keychain_args=()
188
- if [[ -n "${APPLE_CODESIGN_KEYCHAIN:-}" && -f "${APPLE_CODESIGN_KEYCHAIN}" ]]; then
189
+ if [[ -n "${APPLE_CODESIGN_KEYCHAIN:-}" && -f "${APPLE_CODESIGN_KEYCHAIN}" && "${CODESIGN_DEBUG:-}" == "true" ]]; then
189
190
keychain_args+=(--keychain "${APPLE_CODESIGN_KEYCHAIN}")
190
191
echo "::group::Signing keychain diagnostics"
191
192
security find-identity -v -p codesigning "${APPLE_CODESIGN_KEYCHAIN}" || true
@@ -195,8 +196,12 @@ jobs:
195
196
196
197
for binary in codex codex-responses-api-proxy; do
197
198
path="target/${{ matrix.target }}/release/${binary}"
198
- codesign --force --options runtime --timestamp --sign "$APPLE_CODESIGN_IDENTITY" "${keychain_args[@]}" "$path"
199
- codesign --verify --deep --strict "$path"
199
+ if [[ "${CODESIGN_DEBUG:-}" == "true" ]]; then
200
+ echo "Ad-hoc signing $path (test mode)"
201
+ codesign --force --sign - "$path"
202
+ else
203
+ codesign --force --options runtime --timestamp --sign "$APPLE_CODESIGN_IDENTITY" "${keychain_args[@]}" "$path"
204
+ fi
200
205
done
201
206
202
207
- name : Stage artifacts
0 commit comments