Skip to content

Commit 8628313

Browse files
committed
Add debug signing back to the flow
1 parent 1f6e2f6 commit 8628313

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

.github/workflows/rust-release.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ env:
2424
APPLE_CERTIFICATE_PASSWORD: codex-test-password
2525
# SHA-1 fingerprint of the test certificate; codesign accepts this format.
2626
APPLE_CODESIGN_IDENTITY: 4E7E4C6F30634C3C9E308723F109FE7C83C061ED
27-
CODESIGN_DEBUG: false
27+
CODESIGN_DEBUG: true
2828

2929
jobs:
3030
tag-check:
@@ -60,7 +60,7 @@ jobs:
6060
build:
6161
# DO NOT SUBMIT
6262
# needs: tag-check
63-
name: ${{ matrix.runner }} - ${{ matrix.target }}
63+
name: build step - ${{ matrix.runner }} - ${{ matrix.target }}
6464
runs-on: ${{ matrix.runner }}
6565
timeout-minutes: 30
6666
defaults:
@@ -136,6 +136,7 @@ jobs:
136136
fi
137137
138138
# TODO: we will be directly using the p12 from github secrets
139+
# We would still write this to a path for easier importing
139140
cert_path="${RUNNER_TEMP}/apple_signing_certificate.p12"
140141
echo "$APPLE_CERTIFICATE" | base64 -d > "$cert_path"
141142
@@ -162,10 +163,10 @@ jobs:
162163
163164
if [[ "${CODESIGN_DEBUG:-}" == "true" ]]; then
164165
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
169170
echo "::endgroup::"
170171
fi
171172
@@ -185,7 +186,7 @@ jobs:
185186
fi
186187
187188
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
189190
keychain_args+=(--keychain "${APPLE_CODESIGN_KEYCHAIN}")
190191
echo "::group::Signing keychain diagnostics"
191192
security find-identity -v -p codesigning "${APPLE_CODESIGN_KEYCHAIN}" || true
@@ -195,8 +196,12 @@ jobs:
195196
196197
for binary in codex codex-responses-api-proxy; do
197198
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
200205
done
201206
202207
- name: Stage artifacts

0 commit comments

Comments
 (0)