diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7690a402..dadc1aa6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 build.keychain security default-keychain -s build.keychain + security unlock-keychain -p 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 build.keychain + /usr/bin/codesign --force -s ./target/release/macos/Lapce-macos.dmg -v - name: Upload Application uses: svenstaro/upload-release-action@v2 with: