mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-26 10:13:44 +01:00
First attempt at codesigning for macos in github actions
This commit is contained in:
parent
12a2970590
commit
7727e2c86d
29
.github/workflows/build-and-sign-macos.yml
vendored
Normal file
29
.github/workflows/build-and-sign-macos.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
name: Build and Sign macOS
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["SLSA go releaser"]
|
||||
types:
|
||||
- completed
|
||||
jobs:
|
||||
macos:
|
||||
runs-on: macos-11.0
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Download latest executable executable
|
||||
run: |
|
||||
brew install jq
|
||||
export TAG_NAME=`curl https://api.github.com/repos/ddworken/hishtory/releases/latest | jq -r .tag_name`
|
||||
curl -o hishtory-darwin-arm64 https://github.com/ddworken/hishtory/releases/download/$TAG_NAME-darwin-arm64/hishtory-darwin-arm64
|
||||
curl -o hishtory-darwin-amd64 https://github.com/ddworken/hishtory/releases/download/$TAG_NAME-darwin-arm64/hishtory-darwin-amd64
|
||||
- name: Codesign executable
|
||||
env:
|
||||
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
||||
run: |
|
||||
echo $MACOS_CERTIFICATE | base64 —decode > certificate.p12
|
||||
security create-keychain build.keychain
|
||||
security default-keychain -s build.keychain
|
||||
security unlock-keychain build.keychain
|
||||
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
|
||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s build.keychain
|
||||
/usr/bin/codesign --force -s 6D4E1575A0D40C370E294916A8390797106C8A6E hishtory-darwin-arm64 -v
|
Loading…
Reference in New Issue
Block a user