@@ -254,7 +254,41 @@ jobs:
254
254
strategy :
255
255
fail-fast : false
256
256
matrix :
257
- os : [windows-latest, ubuntu-latest, macos-latest]
257
+ include :
258
+ # ── Linux
259
+ - os : ubuntu-latest
260
+ goos : linux
261
+ goarch : amd64
262
+ platform : linux_amd64
263
+ ext : " "
264
+ - os : ubuntu-latest
265
+ goos : linux
266
+ goarch : arm64
267
+ platform : linux_arm64
268
+ ext : " "
269
+ # ── Windows
270
+ - os : windows-latest
271
+ goos : windows
272
+ goarch : amd64
273
+ platform : windows_amd64
274
+ ext : " .exe"
275
+ - os : windows-latest
276
+ goos : windows
277
+ goarch : arm64
278
+ platform : windows_arm64
279
+ ext : " .exe"
280
+ # ── macOS
281
+ - os : macos-latest
282
+ goos : darwin
283
+ goarch : amd64
284
+ platform : macos_amd64
285
+ ext : " "
286
+ - os : macos-latest
287
+ goos : darwin
288
+ goarch : arm64
289
+ platform : macos_arm64
290
+ ext : " "
291
+
258
292
steps :
259
293
- name : Checkout code
260
294
uses : actions/checkout@v4
@@ -289,88 +323,99 @@ jobs:
289
323
- name : Upload artifact
290
324
uses : actions/upload-artifact@v4
291
325
with :
292
- name : ${{ matrix.os }}-binaries
326
+ name : ${{ matrix.platform }}_binaries
293
327
path : build/dist/${{ github.event.repository.name }}_${{ matrix.platform }}_*
294
328
295
329
sign-windows-binaries :
296
330
name : Sign Windows binaries
297
331
needs : [binaries]
298
332
runs-on :
299
- group : ansys-network
300
- labels : [self-hosted, Windows, signtool]
333
+ group : ansys-network
334
+ labels : [self-hosted, Windows, signtool]
301
335
steps :
302
336
- name : Checkout SignTool
303
337
uses : actions/checkout@v4
304
338
with :
305
- repository : ansys/signtool-ansys-apps
306
- token : ${{ secrets.SIGNTOOL_ACCESS_TOKEN }}
339
+ repository : ansys-internal /signtool-ansys-apps
340
+ token : ${{ secrets.SIGNTOOL_ACCESS_TOKEN }}
307
341
308
- - uses : actions/download-artifact@v4
342
+ - name : Download Windows artifacts
343
+ uses : actions/download-artifact@v4
309
344
with :
310
- name : windows-latest-binaries
311
- path : signtool/installer
345
+ pattern : windows_*_binaries
346
+ path : signtool/installer
347
+
348
+ - name : List contents
349
+ run : ls -R signtool/installer
312
350
313
- - name : List current structure
314
- run : ls -R
351
+ - name : Create dist directory
352
+ shell : pwsh
353
+ run : mkdir -p signtool/installer/dist
315
354
316
- - name : Sign Windows Executables
355
+ - name : Sign Windows executables
317
356
working-directory : signtool
357
+ shell : pwsh
318
358
run : |
319
359
# collect every .exe that came from the download‑artifact step
320
360
$files = Get-ChildItem installer -Recurse -Filter "*.exe"
361
+
321
362
if ($files.Count -eq 0) {
322
363
Write-Error "❌ No Windows executables found in signtool/installer — signing aborted."
323
364
exit 1 # → step fails → job fails → workflow fails
324
365
}
366
+
325
367
# Create dist directory if it doesn't exist
326
368
if (!(Test-Path installer/dist)) {
327
369
New-Item -ItemType Directory -Path installer/dist
328
370
}
371
+
329
372
foreach ($file in $files) {
330
373
$jobname = $file.BaseName
331
374
$destFile = "installer/dist/$($file.Name)"
332
375
.\Ansys.SignClient.exe sign --signUrl https://csign.ansys.com -r gh_signtool_account -s '${{ secrets.SIGNTOOL_PWD }}' -n $jobname -i $file.FullName -o $file.FullName
376
+
333
377
# Copy the signed file to the dist directory
334
378
Copy-Item -Path $file.FullName -Destination $destFile
335
379
}
336
380
337
381
- name : Upload signed Windows artifacts
338
382
uses : actions/upload-artifact@v4
339
383
with :
340
- name : windows-binaries-signed
341
- path : signtool/installer/dist/*
342
- if-no-files-found : error
384
+ name : windows-binaries-signed
385
+ path : signtool/installer/dist/*
386
+ if-no-files-found : error
387
+
343
388
release :
344
389
needs : [sign-windows-binaries]
345
390
runs-on : ubuntu-latest
346
391
steps :
347
- - uses : actions/checkout@v4
348
-
349
- # Directory to collect all binaries
350
- - name : Create release directory
351
- run : mkdir -p release_files
352
-
353
- # Download all artifacts to the release directory
354
- - uses : actions/download-artifact@v4
355
- with :
356
- pattern : " *_binaries*"
357
- path : release_files
358
- merge-multiple : true
359
-
360
- # List all files for verification
361
- - name : Verify collected binaries
362
- run : |
363
- echo "▼ release_files contains:"
364
- find release_files -type f | sort
365
-
366
- # Create GitHub release with all files
367
- - name : Create GitHub release
368
- uses : softprops/action-gh-release@v2
369
- with :
370
- generate_release_notes : true
371
- fail_on_unmatched_files : false
372
- files : |
373
- release_files/**/${{ github.event.repository.name }}_*_${{ github.ref_name }}*
392
+ - uses : actions/checkout@v4
393
+
394
+ # Create a directory to collect all binaries
395
+ - name : Create release directory
396
+ run : mkdir -p release_files
397
+
398
+ # Download all artifacts to the release directory
399
+ - uses : actions/download-artifact@v4
400
+ with :
401
+ pattern : " *_binaries*"
402
+ path : release_files
403
+ merge-multiple : true
404
+
405
+ # List all files for verification
406
+ - name : Verify collected binaries
407
+ run : |
408
+ echo "▼ release_files contains:"
409
+ find release_files -type f | sort
410
+
411
+ # Create GitHub release with all files
412
+ - name : Create GitHub release
413
+ uses : softprops/action-gh-release@v2
414
+ with :
415
+ generate_release_notes : true
416
+ fail_on_unmatched_files : false
417
+ files : |
418
+ release_files/**/${{ github.event.repository.name }}_*_${{ github.ref_name }}*
374
419
375
420
main-repo-release :
376
421
name : Update main aali repo and create release
@@ -402,4 +447,4 @@ jobs:
402
447
- name : Run release script
403
448
run : |
404
449
cd aali/scripts/releasehelper
405
- go run main.go "release" ${{ github.ref_name }} ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
450
+ go run main.go "release" ${{ github.ref_name }} ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
0 commit comments