Skip to content

Commit 8cc887a

Browse files
committed
CM-53930: fix onedir signing issues on mac
1 parent 457022c commit 8cc887a

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

.github/workflows/build_executable.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,35 @@ jobs:
176176
177177
# we can't staple the app because it's executable
178178
179+
- name: Verify macOS code signatures
180+
if: runner.os == 'macOS'
181+
run: |
182+
# verify all Mach-O binaries in the output are properly signed
183+
FAILED=false
184+
while IFS= read -r file; do
185+
if file -b "$file" | grep -q "Mach-O"; then
186+
if ! codesign --verify --strict "$file" 2>/dev/null; then
187+
echo "INVALID signature: $file"
188+
codesign -dv "$file" 2>&1 || true
189+
FAILED=true
190+
fi
191+
fi
192+
done < <(find dist/cycode-cli -type f)
193+
194+
if [ "$FAILED" = true ]; then
195+
echo "Found binaries with invalid signatures!"
196+
exit 1
197+
fi
198+
199+
# verify main executable signature in detail
200+
codesign -dv --verbose=4 $PATH_TO_CYCODE_CLI_EXECUTABLE
201+
179202
- name: Test macOS signed executable
180203
if: runner.os == 'macOS'
181204
run: |
182205
file -b $PATH_TO_CYCODE_CLI_EXECUTABLE
183206
time $PATH_TO_CYCODE_CLI_EXECUTABLE version
184207
185-
# verify signature
186-
codesign -dv --verbose=4 $PATH_TO_CYCODE_CLI_EXECUTABLE
187-
188208
- name: Import cert for Windows and setup envs
189209
if: runner.os == 'Windows'
190210
env:

0 commit comments

Comments
 (0)