Skip to content

Commit

Permalink
Try with import-codesign-certs action
Browse files Browse the repository at this point in the history
  • Loading branch information
prof18 committed Jan 24, 2024
1 parent 560991c commit fe960f3
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions .github/workflows/desktop-macos-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,29 @@ jobs:
~/.konan
key: ${{ runner.os }}-v1-${{ hashFiles('*.gradle.kts') }}

- name: Import signing certificate into keychain
run: |
KEYCHAIN_FILE=default.keychain
security create-keychain -p $KEYCHAIN_PASSWORD_MACOS $KEYCHAIN_FILE
security default-keychain -s $KEYCHAIN_FILE
security unlock-keychain -p $KEYCHAIN_PASSWORD_MACOS $KEYCHAIN_FILE
security import <(echo $SIGNING_CERTIFICATE_P12_DATA | base64 --decode) \
-f pkcs12 \
-k $KEYCHAIN_FILE \
-P $SIGNING_CERTIFICATE_PASSWORD \
-T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple: -s -k $KEYCHAIN_PASSWORD_MACOS $KEYCHAIN_FILE
env:
SIGNING_CERTIFICATE_P12_DATA: ${{ secrets.SIGNING_CERTIFICATE_P12_DATA_MACOS }}
SIGNING_CERTIFICATE_PASSWORD: ${{ secrets.SIGNING_CERTIFICATE_PASSWORD_MACOS }}
KEYCHAIN_PASSWORD_MACOS: ${{ secrets.KEYCHAIN_PASSWORD_MACOS }}
# - name: Import signing certificate into keychain
# run: |
# KEYCHAIN_FILE=default.keychain
# security create-keychain -p $KEYCHAIN_PASSWORD_MACOS $KEYCHAIN_FILE
# security default-keychain -s $KEYCHAIN_FILE
# security unlock-keychain -p $KEYCHAIN_PASSWORD_MACOS $KEYCHAIN_FILE
# security import <(echo $SIGNING_CERTIFICATE_P12_DATA | base64 --decode) \
# -f pkcs12 \
# -k $KEYCHAIN_FILE \
# -P $SIGNING_CERTIFICATE_PASSWORD \
# -T /usr/bin/codesign
# security set-key-partition-list -S apple-tool:,apple: -s -k $KEYCHAIN_PASSWORD_MACOS $KEYCHAIN_FILE
# env:
# SIGNING_CERTIFICATE_P12_DATA: ${{ secrets.SIGNING_CERTIFICATE_P12_DATA_MACOS }}
# SIGNING_CERTIFICATE_PASSWORD: ${{ secrets.SIGNING_CERTIFICATE_PASSWORD_MACOS }}
# KEYCHAIN_PASSWORD_MACOS: ${{ secrets.KEYCHAIN_PASSWORD_MACOS }}

- name: Import signing certificate
uses: apple-actions/import-codesign-certs@v2
with:
p12-file-base64: ${{ secrets.SIGNING_CERTIFICATE_P12_DATA_MACOS }}
p12-password: ${{ secrets.SIGNING_CERTIFICATE_PASSWORD_MACOS }}


- name: Run Checks
run: ./gradlew detekt desktopTest jvmTest
Expand Down

0 comments on commit fe960f3

Please sign in to comment.