Skip to content

Commit

Permalink
Merge pull request #26 from espressif/codesign
Browse files Browse the repository at this point in the history
fix: Add codesigning for macOS build artifacts
  • Loading branch information
kolipakakondal authored Aug 21, 2024
2 parents c66e55a + 78173fe commit 210fd22
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/build_rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,22 @@ jobs:
- name: Copy binary to release directory POSIX
if: matrix.os != 'windows-latest'
run: cp target/release/idf-im-cli release/${{ matrix.os }}/eim

- name: Codesign macOS build artifacts
if: startsWith(matrix.os, 'macos')
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
run: |
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
/usr/bin/security create-keychain -p espressif build.keychain
/usr/bin/security default-keychain -s build.keychain
/usr/bin/security unlock-keychain -p espressif build.keychain
/usr/bin/security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
/usr/bin/security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k espressif build.keychain
/usr/bin/codesign --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" release/${{ matrix.os }}/eim -v
/usr/bin/codesign -v -vvv --deep release/${{ matrix.os }}/eim
- name: Upload build artifacts for POSIX
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 210fd22

Please sign in to comment.