-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Copyright © SixtyFPS GmbH <[email protected]> | ||
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial | ||
|
||
--- | ||
name: Apple Codesign Binary | ||
description: Sign the given binary with the developer certificate | ||
|
||
inputs: | ||
binary: | ||
description: 'Path to binary' | ||
required: true | ||
default: "" | ||
certificate: | ||
description: "certificate secret" | ||
required: true | ||
certificate_password: | ||
description: "certificate password" | ||
required: true | ||
keychain_password: | ||
description: "keychain password to use" | ||
required: true | ||
developer_id: | ||
description: "developer id to use" | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Codesign binary | ||
shell: bash | ||
env: | ||
CERT: ${{ inputs.certificate }} | ||
CERT_PW: ${{ inputs.certificate_password }} | ||
KEYCHAIN_PW: ${{ inputs.keychain_password }} | ||
DEV_ID: ${{ inputs.developer_id }} | ||
run: | | ||
echo $CERT | base64 —-decode > certificate.p12 | ||
security create-keychain -p $KEYCHAIN_PW build.keychain | ||
security default-keychain -s build.keychain | ||
security unlock-keychain -p $KEYCHAIN_PW build.keychain | ||
security import certificate.p12 -k build.keychain -P $CERT_PW -T /usr/bin/codesign | ||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $KEYCHAIN_PW build.keychain | ||
/usr/bin/codesign --force -s $DEV_ID ${{ inputs.binary }} -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters