codesign macos dmg

This commit is contained in:
Dongdong Zhou 2021-10-08 17:18:02 +01:00
parent 4e0f8d1638
commit 0485103b0f
1 changed files with 11 additions and 0 deletions

View File

@ -50,6 +50,17 @@ jobs:
- name: Rename
run: |
cp ./target/release/macos/Lapce.dmg ./target/release/macos/Lapce-macos.dmg
- name: Codesign executable
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
run: |
echo $MACOS_CERTIFICATE | base64 —decode > certificate.p12
security create-keychain -p <your-password> build.keychain security default-keychain -s build.keychain
security unlock-keychain -p <your-password> build.keychain
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k <your-password> build.keychain
/usr/bin/codesign --force -s <identity-id> ./target/release/macos/Lapce-macos.dmg -v
- name: Upload Application
uses: svenstaro/upload-release-action@v2
with: