@@ -31,10 +31,10 @@ jobs:
31
31
strategy :
32
32
matrix :
33
33
os : [ubuntu-20.04, windows-2019, macos-12]
34
- arch : [- amd64]
34
+ arch : [amd64]
35
35
include :
36
36
- os : windows-2019
37
- arch : - 386
37
+ arch : 386
38
38
ext : " .exe"
39
39
- os : windows-2019
40
40
ext : " .exe"
@@ -104,11 +104,11 @@ jobs:
104
104
env :
105
105
GOARCH : 386 # 32bit architecture (for support)
106
106
run : task go:build-win
107
- if : matrix.os == 'windows-2019' && matrix.arch == '- 386'
107
+ if : matrix.os == 'windows-2019' && matrix.arch == '386'
108
108
109
109
- name : Build the Agent for win64
110
110
run : task go:build-win # GOARCH=amd64 by default on the runners
111
- if : matrix.os == 'windows-2019' && matrix.arch == '- amd64'
111
+ if : matrix.os == 'windows-2019' && matrix.arch == 'amd64'
112
112
113
113
- name : Build the Agent for macos
114
114
env :
@@ -121,7 +121,7 @@ jobs:
121
121
# this will create `public/` dir with compressed full bin (<version>/<os>-<arch>.gz) and a json file
122
122
- name : Create autoupdate files
123
123
run : go-selfupdate ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION}
124
- if : matrix.arch != '- 386' && steps.prerelease.outputs.IS_PRE != 'true'
124
+ if : matrix.arch != '386' && steps.prerelease.outputs.IS_PRE != 'true'
125
125
126
126
# for now we do not distribute m1 build, this is a workaround for now
127
127
- name : Copy autoupdate file for darwin-arm64 (m1 arch)
@@ -132,8 +132,8 @@ jobs:
132
132
if : matrix.os == 'macos-12' && steps.prerelease.outputs.IS_PRE != 'true'
133
133
134
134
- name : Create autoupdate files for win32
135
- run : go-selfupdate -platform windows${{ matrix.arch }} ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION}
136
- if : matrix.arch == '- 386' && matrix.os == 'windows-2019' && steps.prerelease.outputs.IS_PRE != 'true'
135
+ run : go-selfupdate -platform windows- ${{ matrix.arch }} ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION}
136
+ if : matrix.arch == '386' && matrix.os == 'windows-2019' && steps.prerelease.outputs.IS_PRE != 'true'
137
137
138
138
- name : Upload autoupdate files to Arduino downloads servers
139
139
run : |
@@ -144,7 +144,7 @@ jobs:
144
144
- name : Upload artifacts
145
145
uses : actions/upload-artifact@v3
146
146
with :
147
- name : ${{ env.PROJECT_NAME }}-${{ matrix.os }}${{ matrix.arch }}
147
+ name : ${{ env.PROJECT_NAME }}-${{ matrix.os }}- ${{ matrix.arch }}
148
148
path : |
149
149
${{ env.PROJECT_NAME }}*
150
150
if-no-files-found : error
@@ -334,9 +334,6 @@ jobs:
334
334
INSTALLBUILDER_PATH : " /opt/installbuilder-22.10.0/bin/builder"
335
335
INSTALLER_VARS : " project.outputDirectory=$PWD project.version=${GITHUB_REF##*/} workspace=$PWD realname=Arduino_Create_Agent"
336
336
# vars passed to installbuilder to install https certs automatically
337
- CERT_INSTALL : " ask_certificates_install=CI" # win(edge),mac(safari)
338
- NO_CERT_INSTALL : " ask_certificates_install=CS" # linux
339
- CHOICE_CERT_INSTALL : " ask_certificates_install=CC" # win,mac:(ff,chrome)
340
337
CREATE_OSX_BUNDLED_MG : 0 # tell installbuilder to not create the DMG, gon will take care of that later
341
338
# installbuilder will read this vars automatically (defined in installer.xml):
342
339
INSTALLER_CERT_WINDOWS_PASSWORD : ${{ secrets.INSTALLER_CERT_WINDOWS_PASSWORD }}
@@ -348,29 +345,27 @@ jobs:
348
345
fail-fast : false # if one os is failing continue nonetheless
349
346
matrix : # used to generate installers for different OS and not for runs-on
350
347
os : [ubuntu-20.04, windows-2019, macos-12]
351
- arch : [- amd64]
348
+ arch : [amd64]
352
349
include :
353
350
- os : ubuntu-20.04
354
351
install-builder-name : linux
355
352
executable-path : artifacts/linux-amd64/
353
+ installer-extension : .run
356
354
artifact-name : arduino-create-agent-ubuntu-20.04-amd64
357
355
- os : windows-2019
358
- arch : -386
359
- browser : edge
356
+ arch : 386
360
357
install-builder-name : windows
361
358
executable-path : artifacts/windows/
362
359
extension : .exe
363
360
installer-extension : .exe
364
361
artifact-name : arduino-create-agent-windows-2019-386
365
362
- os : windows-2019
366
- browser : edge
367
363
install-builder-name : windows
368
364
executable-path : artifacts/windows/
369
365
extension : .exe
370
366
installer-extension : .exe
371
367
artifact-name : arduino-create-agent-windows-2019-amd64
372
368
- os : macos-12
373
- browser : safari
374
369
install-builder-name : osx
375
370
executable-path : artifacts/macos/ArduinoCreateAgent.app
376
371
installer-extension : .app
@@ -425,32 +420,19 @@ jobs:
425
420
run : echo "${{ secrets.INSTALLER_CERT_MAC_P12 }}" | base64 --decode > ${{ env.INSTALLER_CERT_MAC_P12 }}
426
421
if : matrix.os == 'macos-12'
427
422
428
- # win(edge),mac(safari) -> CERT_INSTALL and win,mac:(ff,chrome) -> CHOICE_CERT_INSTALL
429
423
# installbuilder reads the env vars with certs paths and use it to sign the installer.
430
- - name : Launch Bitrock installbuilder-20 with CERT_INSTALL && CHOICE_CERT_INSTALL
424
+ - name : Launch Bitrock installbuilder
431
425
run : |
432
- ${{ env.INSTALLBUILDER_PATH }} build installer.xml ${{ matrix.install-builder-name }} --verbose --license /tmp/license.xml --setvars ${{ env.INSTALLER_VARS }} ${{ env.CERT_INSTALL }}
433
- mv -v ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}-installer-CI${{matrix.installer-extension}} ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer-${{matrix.browser}}${{matrix.installer-extension}}
434
- ${{ env.INSTALLBUILDER_PATH }} build installer.xml ${{ matrix.install-builder-name }} --verbose --license /tmp/license.xml --setvars ${{ env.INSTALLER_VARS }} ${{ env.CHOICE_CERT_INSTALL }}
435
- cp -vr ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}-installer-CC${{matrix.installer-extension}} ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer-chrome${{matrix.installer-extension}}
436
- mv -v ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}-installer-CC${{matrix.installer-extension}} ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer-firefox${{matrix.installer-extension}}
437
- rm -r ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}-installer-C*
438
- if : matrix.os == 'windows-2019' || matrix.os == 'macos-12'
439
-
440
- # linux
441
- - name : Launch Bitrock installbuilder-20 with NO_CERT_INSTALL
442
- run : |
443
- ${{ env.INSTALLBUILDER_PATH }} build installer.xml linux-x64 --verbose --license /tmp/license.xml --setvars ${{ env.INSTALLER_VARS }} ${{ env.NO_CERT_INSTALL }}
444
- cp -v ArduinoCreateAgent-${GITHUB_REF##*/}-linux-x64-installer-CS.run ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer-chrome.run
445
- mv -v ArduinoCreateAgent-${GITHUB_REF##*/}-linux-x64-installer-CS.run ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer-firefox.run
446
- cp -v ArduinoCreateAgent-${GITHUB_REF##*/}-linux-x64-installer-CS.tar.gz ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer-chrome.tar.gz
447
- mv -v ArduinoCreateAgent-${GITHUB_REF##*/}-linux-x64-installer-CS.tar.gz ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer-firefox.tar.gz
426
+ ${{ env.INSTALLBUILDER_PATH }} build installer.xml ${{ matrix.install-builder-name }} --verbose --license /tmp/license.xml --setvars ${{ env.INSTALLER_VARS }} architecture=${{ matrix.arch }}
427
+
428
+ - name : Generate archive
429
+ run : tar -czvf ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}-${{ matrix.arch }}-installer.tar.gz ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}-${{ matrix.arch }}-installer${{matrix.installer-extension}}
448
430
if : matrix.os == 'ubuntu-20.04'
449
431
450
432
- name : Upload artifacts
451
433
uses : actions/upload-artifact@v3
452
434
with :
453
- name : ArduinoCreateAgent-${{ matrix.install-builder-name }}${{ matrix.arch }}
435
+ name : ArduinoCreateAgent-${{ matrix.install-builder-name }}- ${{ matrix.arch }}
454
436
path : ArduinoCreateAgent*
455
437
if-no-files-found : error
456
438
@@ -459,20 +441,19 @@ jobs:
459
441
needs : package
460
442
strategy :
461
443
matrix :
462
- browser : [safari, firefox, chrome]
463
- arch : [-amd64]
444
+ arch : [amd64]
464
445
465
446
runs-on : macos-12
466
447
steps :
467
448
- name : Download artifact
468
449
uses : actions/download-artifact@v3
469
450
with :
470
- name : ArduinoCreateAgent-osx${{ matrix.arch }}
451
+ name : ArduinoCreateAgent-osx- ${{ matrix.arch }}
471
452
path : ArduinoCreateAgent-osx
472
453
473
454
# zip artifacts do not mantain executable permission
474
455
- name : Make executable
475
- run : chmod -v +x ArduinoCreateAgent-osx/ArduinoCreateAgent-${GITHUB_REF##*/}-osx${{ matrix.arch }}-installer-${{ matrix.browser }} .app/Contents/MacOS/*
456
+ run : chmod -v +x ArduinoCreateAgent-osx/ArduinoCreateAgent-${GITHUB_REF##*/}-osx- ${{ matrix.arch }}-installer.app/Contents/MacOS/*
476
457
477
458
- name : Import Code-Signing Certificates
478
459
run : |
@@ -502,33 +483,33 @@ jobs:
502
483
# gon does not allow env variables in config file (https://github.com/mitchellh/gon/issues/20)
503
484
run : |
504
485
cat > gon.config_installer.hcl <<EOF
505
- source = ["ArduinoCreateAgent-osx/ArduinoCreateAgent-${GITHUB_REF##*/}-osx${{ matrix.arch }}-installer-${{ matrix.browser }} .app"]
486
+ source = ["ArduinoCreateAgent-osx/ArduinoCreateAgent-${GITHUB_REF##*/}-osx- ${{ matrix.arch }}-installer.app"]
506
487
bundle_id = "cc.arduino.${{ env.PROJECT_NAME }}-installer"
507
488
508
489
sign {
509
490
application_identity = "Developer ID Application: ARDUINO SA (7KT7ZWMCJT)"
510
491
}
511
492
512
493
dmg {
513
- output_path = "ArduinoCreateAgent-${GITHUB_REF##*/}-osx${{ matrix.arch }}-installer-${{ matrix.browser }} .dmg"
494
+ output_path = "ArduinoCreateAgent-${GITHUB_REF##*/}-osx- ${{ matrix.arch }}-installer.dmg"
514
495
volume_name = "ArduinoCreateAgent"
515
496
}
516
497
EOF
517
498
518
499
- name : Code sign and notarize app
519
500
run : |
520
- echo "gon will notarize executable in ArduinoCreateAgent-osx/ArduinoCreateAgent-${GITHUB_REF##*/}-osx${{ matrix.arch }}-installer-${{ matrix.browser }} .app"
501
+ echo "gon will notarize executable in ArduinoCreateAgent-osx/ArduinoCreateAgent-${GITHUB_REF##*/}-osx- ${{ matrix.arch }}-installer.app"
521
502
gon -log-level=debug -log-json gon.config_installer.hcl
522
503
timeout-minutes : 30
523
504
524
505
# tar dmg file to keep executable permission
525
506
- name : Tar files to keep permissions
526
- run : tar -cvf ArduinoCreateAgent-${GITHUB_REF##*/}-osx${{ matrix.arch }}-installer-${{ matrix.browser }}. tar ArduinoCreateAgent-${GITHUB_REF##*/}-osx${{ matrix.arch }}-installer-${{ matrix.browser }} .dmg
507
+ run : tar -cvf ArduinoCreateAgent-${GITHUB_REF##*/}-osx- ${{ matrix.arch }}-installer. tar ArduinoCreateAgent-${GITHUB_REF##*/}-osx- ${{ matrix.arch }}-installer.dmg
527
508
528
509
- name : Upload artifacts
529
510
uses : actions/upload-artifact@v3
530
511
with :
531
- name : ArduinoCreateAgent-osx${{ matrix.arch }}
512
+ name : ArduinoCreateAgent-osx- ${{ matrix.arch }}
532
513
path : ArduinoCreateAgent*.tar
533
514
if-no-files-found : error
534
515
0 commit comments