import-codesign-certs
import-codesign-certs copied to clipboard
Add multipe certificates to the keychain
Hi,
I sucessfully used this action together with the java jpackage tool. However, the jpackage creates both a pkg installer and a dmg. And I think I need to add certs for both. So my question is, can I just copy the action or is there an option to add a second cert?
Edit// I just copied the action and specified a password manually for the keychain For the copy I set create keychain to false
ت
I was able to make this work, but needed to specify an explicit password for the temporary keychain otherwise the second invocation could not make use of it.
- if: runner.os == 'macOS' name: Import Certificate - Application uses: apple-actions/import-codesign-certs@v1 with: keychain-password: YOUR_RANDOM_VALUE_HERE p12-file-base64: ${{ secrets.MAC_APPLICATION_CERTIFICATE_DATA }} p12-password: ${{ secrets.MAC_APPLICATION_CERTIFICATE_PASSPHRASE }} - if: runner.os == 'macOS' name: Import Certificate - Installer uses: apple-actions/import-codesign-certs@v1 with: create-keychain: false # do not create a new keychain for this value keychain-password: YOUR_RANDOM_VALUE_HERE p12-file-base64: ${{ secrets.MAC_INSTALLER_CERTIFICATE_DATA }} p12-password: ${{ secrets.MAC_INSTALLER_CERTIFICATE_PASSPHRASE }}
Yep. That's how I did it as well
hey guys, how did you manage to add the p12 certificate as a secret if secrets only allows text input and the p12 file is binary data?
@L4ZZA You can convert them as base64 text.
openssl base64 -in MyCertificate.p12 -out MyCertificate.txt
@Siedlerchr Btw, we all didn't read readme properly. It says "import certificates". So, instead of two actions you could just export several certificates as one p12 and import it.
@lolgear Ah didn't know about that this works as well. Next time I will try this