add *.bundle to codesigning

This commit is contained in:
Jacob Heider 2023-02-14 17:35:35 -05:00
parent 10583d9b6c
commit 804519cb7b
No known key found for this signature in database
GPG key ID: A98011B5713535BF

View file

@ -38,45 +38,45 @@ runs:
p12-password: ${{ inputs.p12-password }} p12-password: ${{ inputs.p12-password }}
# Codesign libs and bins # Codesign libs and bins
- name: Codesign package - name: Find libs and bins
id: find
shell: bash shell: bash
run: | run: |
for PATH in $PATHS; do for PATH in $PATHS; do
LIBS="$(/usr/bin/find $PATH -name '*.so' -or -name '*.dylib')" LIBS="$(/usr/bin/find $PATH -name '*.so' -or -name '*.dylib' -or -name '*.bundle')"
if test -d $PATH/bin; then if test -d $PATH/bin; then
BINS="$(/usr/bin/find $PATH/bin -type f)" BINS="$(/usr/bin/find $PATH/bin -type f)"
fi fi
for FILE in $LIBS $BINS; do
BASENAME="$(/usr/bin/basename "$FILE")"
/usr/bin/codesign -s "$IDENTITY" --force -v --deep --timestamp --preserve-metadata=entitlements -o runtime "$FILE" || true
done
done done
echo -e "files<<EOF\n$LIBS\n$BINS\nEOF" >> $GITHUB_OUTPUT
env: env:
PATHS: ${{ inputs.paths }} PATHS: ${{ inputs.paths }}
- name: Codesign files
shell: bash
run: |
echo "$FILES" | /usr/bin/xargs /usr/bin/codesign -s "$IDENTITY" --force -v --deep \
--timestamp --preserve-metadata=entitlements -o runtime || true
env:
FILES: ${{ steps.find.outputs.files }}
IDENTITY: ${{ inputs.identity }} IDENTITY: ${{ inputs.identity }}
# This isn't very informative, but even a no-op is safer than none # This isn't very informative, but even a no-op is safer than none
- name: Check codesigning - name: Check codesigning
shell: bash shell: bash
run: | run: |
for PATH in $PATHS; do for FILE in $FILES; do
LIBS="$(/usr/bin/find $PATH -name '*.so' -or -name '*.dylib')" # FIXME: `deno` compiled binaries don't currently pass validation.
if test -d $PATH/bin; then # https://github.com/denoland/deno/issues/17753
BINS="$(/usr/bin/find $PATH/bin -type f)" if test "$(/usr/bin/basename "$FILE")" = "tea"; then
continue
fi fi
for SIGNED in $LIBS $BINS; do
# FIXME: `deno` compiled binaries don't currently pass validation.
# https://github.com/denoland/deno/issues/17753
if test "$(/usr/bin/basename "$SIGNED")" = "tea"; then
continue
fi
/usr/bin/codesign -vvv --deep --strict "$SIGNED" /usr/bin/codesign -vvv --deep --strict "$FILE"
done
done done
env: env:
PATHS: ${{ inputs.paths }} FILES: ${{ steps.find.outputs.files }}
# Needed for self-hosted runner, since it doesn't destroy itself automatically. # Needed for self-hosted runner, since it doesn't destroy itself automatically.
- name: Delete keychain - name: Delete keychain