Apple-Actions / import-codesign-certs

GitHub Action for Importing Code-signing Certificates into a Keychain
MIT License
186 stars 79 forks source link

Installation Guide #6

Closed tciuro closed 4 years ago

tciuro commented 4 years ago

Hello,

Noob here. So I have the base64 file created from a password-protected p12 file. I see that I'm supposed to enter the following in the yaml file:

uses: apple-actions/import-codesign-certs@v1
with: 
  p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
  p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}

Questions:

Thanks!

orj commented 4 years ago

@tciuro Apologies for not providing more documentation. Note that this project is for a GitHub Action. You should be familiar with GitHub Actions in order to use it.

The YAML is your GitHub Actions workflow. The attributes are making reference to GitHub Action secrets.

DimitarNestorov commented 4 years ago

The P12 file is a result of exporting your certificate from Keychain Access. This certificate requires you to set up a password hence the p12-password. This export is also a binary file and the GitHub Action secrets are strings so you will have to convert that binary in base64, and even though it is password protected I would still advise not to use online tools for the conversion.

orj commented 4 years ago

There is a command line too in macOS Catalina called base64. You can do the conversion in terminal. So once you've exported your Code Signing Certificate and Private Key from Keychain Access to a file named Certificate.p12 you can run this command.

Eg:

cat Certificate.p12 | base64 | pbcopy

The above command line will put the base64 encoded .p12 file into your Mac's Copy/Paste buffer so you can paste it into a GitHub Actions Secret which you can later feed into your workflow.

tciuro commented 4 years ago

Yup. I got it working! Thanks a lot for the help! 🤙🏻