forked from indygreg/PyOxidizer
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (65 loc) · 2.26 KB
/
sign-apple-exe.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Remotely code sign an Apple executable
on:
workflow_dispatch:
inputs:
workflow:
description: 'Workflow file name or ID'
required: true
type: string
run_id:
description: 'Workflow run ID to use'
required: true
type: string
artifact:
description: 'Name of artifact to download'
required: true
type: string
exe_name:
description: 'Name of executable file to sign'
required: true
type: string
rcodesign_branch:
description: 'Name of branch to obtain rcodesign executable from'
required: false
default: main
jobs:
sign:
name: Sign ${{ github.event.inputs.exe_name }}
runs-on: 'ubuntu-22.04'
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Download rcodesign Linux executable
uses: dawidd6/action-download-artifact@9662f5cf4983f094c5b142e8fec9ddea560ca302
with:
repo: ${{github.repository}}
workflow: '.github/workflows/rcodesign.yml'
workflow_conclusion: success
branch: ${{ github.event.inputs.rcodesign_branch }}
event: push
name: exe-rcodesign-x86_64-unknown-linux-musl
path: bins/
- name: Download artifact to sign
uses: dawidd6/action-download-artifact@9662f5cf4983f094c5b142e8fec9ddea560ca302
with:
repo: ${{ github.repository }}
workflow: ${{ github.event.inputs.workflow }}
run_id: ${{ github.event.inputs.run_id }}
workflow_conclusion: completed
name: ${{ github.event.inputs.artifact }}
path: dist/input
- name: Perform remote code signing
run: |
# Just in case.
chmod +x bins/rcodesign
bins/rcodesign sign \
--remote-signer \
--remote-public-key-pem-file ci/developer-id-application.pem \
--code-signature-flags runtime \
dist/input/${{ github.event.inputs.exe_name }} \
dist/output/${{ github.event.inputs.exe_name }}
- name: Upload
uses: actions/upload-artifact@v3
with:
name: exe-${{ github.event.inputs.exe_name }}
path: dist/output/${{ github.event.inputs.exe_name }}