@@ -184,24 +184,45 @@ jobs:
184
184
echo "both develop builds for edge"
185
185
echo 'variants=["release", "internal-release"]' >> $GITHUB_OUTPUT
186
186
echo 'type=develop' >> $GITHUB_OUTPUT
187
- elif [ "${{ format('{0}', endsWith (github.ref, 'app-build-internal')) }}" = "true" ] ; then
188
- echo "internal-release builds for app-build-internal suffixes"
187
+ elif [ "${{ format('{0}', contains (github.ref, 'app-build-internal')) }}" = "true" ] ; then
188
+
189
189
echo 'variants=["internal-release"]' >> $GITHUB_OUTPUT
190
- echo 'type=develop' >> $GITHUB_OUTPUT
191
- elif [ "${{ format('{0}', endsWith(github.ref, 'app-build')) }}" = "true" ] ; then
192
- echo "release develop builds for app-build suffixes"
190
+ if [ "${{ format('{0}', contains(github.ref, 'as-release')) }}" = "true" ] ; then
191
+ echo "internal-release as-release builds for app-build-internal + as-release suffixes"
192
+ echo 'type=as-release' >> $GITHUB_OUTPUT
193
+ else
194
+ echo "internal-release develop builds for app-build-internal suffixes"
195
+ echo 'type=develop' >> $GITHUB_OUTPUT
196
+ fi
197
+ elif [ "${{ format('{0}', contains(github.ref, 'app-build')) }}" = "true" ] ; then
193
198
echo 'variants=["release"]' >> $GITHUB_OUTPUT
194
- echo 'type=develop' >> $GITHUB_OUTPUT
195
- elif [ "${{ format('{0}', endsWith(github.ref, 'app-build-both')) }}" = "true" ] ; then
196
- echo "Both develop builds for app-build-both suffixes"
199
+ if [ "${{ format('{0}', contains(github.ref, 'as-release')) }}" = "true" ] ; then
200
+ echo "release as-release builds for app-build + as-release suffixes"
201
+ echo 'type=as-release' >> $GITHUB_OUTPUT
202
+ else
203
+ echo "release develop builds for app-build suffixes"
204
+ echo 'type=develop' >> $GITHUB_OUTPUT
205
+ fi
206
+ elif [ "${{ format('{0}', contains(github.ref, 'app-build-both')) }}" = "true" ] ; then
207
+
197
208
echo 'variants=["release", "internal-release"]' >> $GITHUB_OUTPUT
198
- echo 'type=develop' >> $GITHUB_OUTPUT
209
+ if [ "${{ format('{0}', contains(github.ref, 'as-release')) }}" = "true" ] ; then
210
+ echo "Both as-release builds for app-build-both + as-release suffixes"
211
+ echo 'type=as-release' >> $GITHUB_OUTPUT
212
+ else
213
+ echo "Both develop builds for app-build-both + as-release suffixes"
214
+ echo 'type=develop' >> $GITHUB_OUTPUT
215
+ fi
199
216
else
200
217
echo "No build for ref ${{github.ref}} and event ${{github.event_type}}"
201
218
echo 'variants=[]' >> $GITHUB_OUTPUT
202
219
echo 'type=develop' >> $GITHUB_OUTPUT
203
220
fi
204
221
222
+ - name : set summary
223
+ run : |
224
+ echo 'Type: ${{steps.determine-build-type.outputs.type}} Variants: ${{steps.determine-build-type.outputs.variants}}' >> $GITHUB_STEP_SUMMARY
225
+
205
226
build-app :
206
227
needs : [determine-build-type]
207
228
if : needs.determine-build-type.outputs.variants != '[]'
@@ -276,15 +297,49 @@ jobs:
276
297
npm config set cache ${{ github.workspace }}/.npm-cache
277
298
yarn config set cache-folder ${{ github.workspace }}/.yarn-cache
278
299
make setup-js
300
+
301
+ - name : ' Configure Windows code signing environment'
302
+ if : startsWith(matrix.os, 'windows') && contains(needs.determine-build-type.outputs.type, 'release')
303
+ shell : bash
304
+ run : |
305
+ echo "${{ secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12
306
+ echo "${{ secrets.WINDOWS_CSC_B64}}" | base64 --decode > /d/opentrons_labworks_inc.crt
307
+ echo "C:\Program Files (x86)\Windows Kits\10\App Certification Kit" >> $GITHUB_PATH
308
+ echo "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools" >> $GITHUB_PATH
309
+ echo "C:\Program Files\DigiCert\DigiCert Keylocker Tools" >> $GITHUB_PATH
310
+
311
+ - name : ' Setup Windows code signing helpers'
312
+ if : startsWith(matrix.os, 'windows') && contains(needs.determine-build-type.outputs.type, 'release')
313
+ shell : cmd
314
+ env :
315
+ SM_HOST : ${{ secrets.SM_HOST }}
316
+ SM_CLIENT_CERT_FILE : " D:\\ Certificate_pkcs12.p12"
317
+ SM_CLIENT_CERT_PASSWORD : ${{secrets.SM_CLIENT_CERT_PASSWORD}}
318
+ SM_API_KEY : ${{secrets.SM_API_KEY}}
319
+ run : |
320
+ curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/Keylockertools-windows-x64.msi/download -H "x-api-key:${{secrets.SM_API_KEY}}" -o Keylockertools-windows-x64.msi
321
+ msiexec /i Keylockertools-windows-x64.msi /quiet /qn
322
+ smksp_registrar.exe list
323
+ smctl.exe keypair ls
324
+ C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user
325
+ smksp_cert_sync.exe
326
+ smctl.exe healthcheck --all
327
+
279
328
# build the desktop app and deploy it
280
329
- name : ' build ${{matrix.variant}} app for ${{ matrix.os }}'
281
330
if : matrix.target == 'desktop'
282
331
timeout-minutes : 60
283
332
env :
284
333
OT_APP_MIXPANEL_ID : ${{ secrets.OT_APP_MIXPANEL_ID }}
285
334
OT_APP_INTERCOM_ID : ${{ secrets.OT_APP_INTERCOM_ID }}
286
- WIN_CSC_LINK : ${{ secrets.OT_APP_CSC_WINDOWS }}
287
- WIN_CSC_KEY_PASSWORD : ${{ secrets.OT_APP_CSC_KEY_WINDOWS }}
335
+ WINDOWS_SIGN : ${{ format('{0}', contains(needs.determine-build-type.outputs.type, 'release')) }}
336
+ SM_HOST : ${{secrets.SM_HOST}}
337
+ SM_CLIENT_CERT_FILE : " D:\\ Certificate_pkcs12.p12"
338
+ SM_CLIENT_CERT_PASSWORD : ${{secrets.SM_CLIENT_CERT_PASSWORD}}
339
+ SM_API_KEY : ${{secrets.SM_API_KEY}}
340
+ SM_CODE_SIGNING_CERT_SHA1_HASH : ${{secrets.SM_CODE_SIGNING_CERT_SHA1_HASH}}
341
+ SM_KEYPAIR_ALIAS : ${{secrets.SM_KEYPAIR_ALIAS}}
342
+ WINDOWS_CSC_FILEPATH : " D:\\ opentrons_labworks_inc.crt"
288
343
CSC_LINK : ${{ secrets.OT_APP_CSC_MACOS }}
289
344
CSC_KEY_PASSWORD : ${{ secrets.OT_APP_CSC_KEY_MACOS }}
290
345
APPLE_ID : ${{ secrets.OT_APP_APPLE_ID }}
0 commit comments