15
15
workflow_call :
16
16
inputs :
17
17
whl-file-name :
18
- required : true
18
+ required : false
19
+ type : string
20
+ whl-url :
21
+ required : false
19
22
type : string
20
23
ref :
21
24
description : ' A ref for this workflow to check out its own repo'
22
- required : true
25
+ required : false
23
26
type : string
24
27
release :
25
28
description : ' Is this a release asset?'
55
58
PYTHON_VERSION : " 3.10.10"
56
59
MACOSX_DEPLOYMENT_TARGET : " 10.9"
57
60
steps :
61
+ - name : Validate whl reference inputs
62
+ if : ${{ (inputs.whl-file-name && inputs.whl-url) || (!inputs.whl-file-name && !inputs.whl-url) }}
63
+ run : |
64
+ echo "Must specify exactly one reference for the whl file to build the EXE with."
65
+ exit 1
58
66
- uses : actions/checkout@v4
59
67
if : ${{ !inputs.ref }}
60
68
- uses : actions/checkout@v4
85
93
- name : Install dependencies
86
94
run : make dependencies
87
95
- name : Download the whlfile from URL and install
88
- if : ${{ github.event. inputs.whl-url }}
89
- run : make get-whl whl=${{ github.event. inputs.whl-url }}
96
+ if : ${{ inputs.whl-url }}
97
+ run : make get-whl whl=${{ inputs.whl-url }}
90
98
- name : Download the whlfile from artifacts
91
99
if : ${{ inputs.whl-file-name }}
92
100
uses : actions/download-artifact@v4
97
105
if : ${{ inputs.whl-file-name }}
98
106
run : make install-whl whl=whl/${{ inputs.whl-file-name }}
99
107
- name : Setup app signing certificate
100
- if : ${{ inputs.release == true || github.event.inputs.release == 'true' }}
108
+ if : ${{ inputs.release }}
101
109
env :
102
110
KEYCHAIN_PASSWORD : ${{ hashFiles('*')}}
103
111
run : |
@@ -114,15 +122,15 @@ jobs:
114
122
- name : Build the app
115
123
run : make build-mac-app
116
124
- name : Codesign the app
117
- if : ${{ inputs.release == true || github.event.inputs.release == 'true' }}
125
+ if : ${{ inputs.release }}
118
126
run : MAC_CODESIGN_IDENTITY="${{ secrets.KOLIBRI_MAC_APP_IDENTITY }}" make codesign-mac-app
119
127
- name : Build the DMG
120
128
run : make build-dmg
121
129
- name : Codesign the DMG
122
- if : ${{ inputs.release == true || github.event.inputs.release == 'true' }}
130
+ if : ${{ inputs.release }}
123
131
run : MAC_CODESIGN_IDENTITY="${{ secrets.KOLIBRI_MAC_APP_IDENTITY }}" make codesign-dmg
124
132
- name : Notarize the DMG
125
- if : ${{ inputs.release == true || github.event.inputs.release == 'true' }}
133
+ if : ${{ inputs.release }}
126
134
env :
127
135
MAC_NOTARIZE_USERNAME : ${{ secrets.KOLIBRI_MAC_APP_USERNAME }}
128
136
MAC_NOTARIZE_PASSWORD : ${{ secrets.KOLIBRI_MAC_APP_PASSWORD }}
0 commit comments