You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Code Sign Action
v2.0.0
This is a GitHub action that allows you to code sign files. It was developed specifically to code sign binaries built using @lando/pkg-action so it may not be appropriate for all use cases. It also can do basic mac OS notarization.
- Does not currently code sign on Linux
- Does not staple the notarized file
- You may need to set
options: --options runtime --entitlements entitlements.xml
for notarization to work correctly
These keys must be set correctly for the action to work.
Name | Description | Example Value |
---|---|---|
file |
The file to sign. | bin/test |
certificate-data |
A base64 encoded string of your p12 or pfx cert contents. |
${{ secrets.APPLE_CERT_DATA }} |
certificate-password |
The password to unlock the certificate-data . |
${{ secrets.APPLE_CERT_PASSWORD }} |
These keys are set to sane defaults but can be modified as needed.
Name | Description | Default | Example |
---|---|---|---|
apple-notary-user |
(Required) for macOS notarization. Does nothing on linux and win . The Apple Developer account email to use in notarization. |
null |
${{ secrets.APPLE_NOTARY_USER }} |
apple-notary-password |
(Required) for macOS notarization. Does nothing on linux and win . The Apple Developer account password to use in notarization. |
null |
${{ secrets.APPLE_NOTARY_PASSWORD }} |
apple-product-id |
(Required) for macOS notarization. Does nothing on linux and win . The Apple Developer Product ID to use in notarization. |
null |
dev.lando.code-sign-action |
apple-team-id |
(Required) for macOS . Does nothing on linux and win . The Apple Developer Program Team ID. |
null |
FY8GAUX287 |
options |
Additional options to pass to the signing tool. | null |
--options runtime --entitlements entitlements.xml |
outputs:
file:
description: "The path to the signed and/or notarized file."
value: ${{ steps.code-sign-action.outputs.file }}
macOS
jobs:
package:
runs-on: macos-11
steps:
name: Sign binary
uses: lando/code-sign-action@v2
with:
file: path/to/binary
certificate-data: ${{ secrets.APPLE_CERT_DATA }}
certificate-password: ${{ secrets.APPLE_CERT_PASSWORD }}
apple-team-id: ${{ secrets.APPLE_TEAM_ID }}
macOS with notarization
jobs:
package:
runs-on: macos-11
steps:
name: Sign binary
uses: lando/code-sign-action@v2
with:
file: path/to/binary
certificate-data: ${{ secrets.APPLE_CERT_DATA }}
certificate-password: ${{ secrets.APPLE_CERT_PASSWORD }}
apple-notary-user: ${{ secrets.APPLE_NOTARY_USER }}
apple-notary-password: ${{ secrets.APPLE_NOTARY_PASSWORD }}
apple-team-id: FY8GAUX282
apple-product-id: dev.lando.code-sign-action
options: --options runtime --entitlements entitlements.xml
Windows
jobs:
package:
runs-on: windows-2022
steps:
name: Sign binary
uses: lando/code-sign-action@v2
with:
file: path/to/binary
certificate-data: ${{ secrets.WINDOZE_CERT_DATA }}
certificate-password: ${{ secrets.WINDOZE_CERT_PASSWORD }}
We try to log all changes big and small in both THE CHANGELOG and the release notes.
- Correctly bump versions, tag things and push to GitHub
yarn release
- Publish to GitHub Actions Marketplace
Made with contrib.rocks.