@@ -11,7 +11,7 @@ permissions:
11
11
12
12
env :
13
13
# As defined by the Taskfile's PROJECT_NAME variable
14
- PROJECT_NAME : arduino-create -agent
14
+ PROJECT_NAME : arduino-cloud -agent
15
15
TARGET : " /CreateAgent/Stable/"
16
16
VERSION_TARGET : " arduino-create-static/agent-metadata/"
17
17
AWS_REGION : " us-east-1" # or https://github.com/aws/aws-cli/issues/5623
@@ -132,7 +132,7 @@ jobs:
132
132
- name : Create autoupdate files for win32
133
133
run : go-selfupdate -platform windows-${{ matrix.arch }} ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION}
134
134
if : matrix.arch == '386' && matrix.os == 'windows-2019' && steps.prerelease.outputs.IS_PRE != 'true'
135
-
135
+
136
136
- name : configure aws credentials
137
137
uses : aws-actions/configure-aws-credentials@v4
138
138
with :
@@ -186,8 +186,8 @@ jobs:
186
186
- name : Make executable
187
187
run : chmod -v +x ${{ env.EXE_PATH }}${{ env.PROJECT_NAME }}
188
188
189
- - name : Rename executable to Arduino_Create_Agent
190
- run : mv -v ${{ env.EXE_PATH }}${{ env.PROJECT_NAME }} ${{ env.EXE_PATH }}Arduino_Create_Agent
189
+ - name : Rename executable to Arduino_Cloud_Agent
190
+ run : mv -v ${{ env.EXE_PATH }}${{ env.PROJECT_NAME }} ${{ env.EXE_PATH }}Arduino_Cloud_Agent
191
191
192
192
- name : get year
193
193
run : echo "YEAR=$(date "+%Y")" >> $GITHUB_ENV
@@ -199,8 +199,8 @@ jobs:
199
199
200
200
<key>CFBundleIconFile</key> <string>AppIcon.icns</string>
201
201
202
- <key>CFBundleName</key> <string>Arduino Create Agent</string>
203
- <key>CFBundleExecutable</key> <string>Arduino_Create_Agent </string>
202
+ <key>CFBundleName</key> <string>Arduino Cloud Agent</string>
203
+ <key>CFBundleExecutable</key> <string>Arduino_Cloud_Agent </string>
204
204
<key>CFBundleIdentifier</key> <string>create.arduino.cc</string>
205
205
206
206
<key>CFBundleVersion</key> <string>${GITHUB_REF##*/}</string>
@@ -215,14 +215,14 @@ jobs:
215
215
EOF
216
216
217
217
- name : Tar bundle to keep permissions
218
- run : tar -cvf ArduinoCreateAgent .app_${{ matrix.arch }}.tar -C skel/ .
218
+ run : tar -cvf ArduinoCloudAgent .app_${{ matrix.arch }}.tar -C skel/ .
219
219
220
220
- name : Upload artifacts
221
221
uses : actions/upload-artifact@v4
222
222
with :
223
223
if-no-files-found : error
224
- name : ArduinoCreateAgent .app_${{ matrix.arch }}
225
- path : ArduinoCreateAgent .app_${{ matrix.arch }}.tar
224
+ name : ArduinoCloudAgent .app_${{ matrix.arch }}
225
+ path : ArduinoCloudAgent .app_${{ matrix.arch }}.tar
226
226
227
227
# The notarize-macos job will download the macos bundle from the previous job, sign, notarize and re-upload it, uploading it also on s3 download servers for the autoupdate.
228
228
notarize-macos :
@@ -243,10 +243,10 @@ jobs:
243
243
- name : Download artifact
244
244
uses : actions/download-artifact@v4
245
245
with :
246
- name : ArduinoCreateAgent .app_${{ matrix.arch }}
246
+ name : ArduinoCloudAgent .app_${{ matrix.arch }}
247
247
248
248
- name : un-Tar bundle
249
- run : tar -xvf ArduinoCreateAgent .app_${{ matrix.arch }}.tar
249
+ run : tar -xvf ArduinoCloudAgent .app_${{ matrix.arch }}.tar
250
250
251
251
- name : Import Code-Signing Certificates
252
252
run : |
@@ -286,7 +286,7 @@ jobs:
286
286
run : |
287
287
cat > "${{ env.GON_CONFIG_PATH }}" <<EOF
288
288
# See: https://github.com/mitchellh/gon#configuration-file
289
- source = ["ArduinoCreateAgent .app"]
289
+ source = ["ArduinoCloudAgent .app"]
290
290
bundle_id = "cc.arduino.${{ env.PROJECT_NAME }}"
291
291
292
292
sign {
@@ -300,7 +300,7 @@ jobs:
300
300
run : gon -log-level=debug -log-json "${{ env.GON_CONFIG_PATH }}"
301
301
302
302
- name : Zip output app bundle
303
- run : ditto -c -k ArduinoCreateAgent .app/ ArduinoCreateAgent .app_${{ matrix.arch }}_notarized.zip
303
+ run : ditto -c -k ArduinoCloudAgent .app/ ArduinoCloudAgent .app_${{ matrix.arch }}_notarized.zip
304
304
305
305
- name : Remove gon used for code signing
306
306
run : |
@@ -311,19 +311,19 @@ jobs:
311
311
run : |
312
312
wget -q https://github.com/Bearer/gon/releases/download/v0.0.27/gon_macos.zip
313
313
unzip gon_macos.zip -d /usr/local/bin
314
-
314
+
315
315
- name : Write gon config to file
316
316
run : |
317
317
cat > "${{ env.GON_CONFIG_PATH }}" <<EOF
318
318
# See: https://github.com/Bearer/gon#configuration-file
319
319
320
320
notarize {
321
- path = "ArduinoCreateAgent .app_${{ matrix.arch }}_notarized.zip"
321
+ path = "ArduinoCloudAgent .app_${{ matrix.arch }}_notarized.zip"
322
322
bundle_id = "cc.arduino.${{ env.PROJECT_NAME }}"
323
323
}
324
324
325
325
EOF
326
-
326
+
327
327
- name : Notarize app bundle
328
328
run : |
329
329
gon -log-level=debug -log-json "${{ env.GON_CONFIG_PATH }}"
@@ -337,15 +337,15 @@ jobs:
337
337
if : ${{ needs.build.outputs.prerelease != 'true' }}
338
338
339
339
- name : Upload autoupdate bundle to Arduino downloads servers
340
- run : aws s3 cp ArduinoCreateAgent .app_${{ matrix.arch }}_notarized.zip s3://${{ secrets.DOWNLOADS_BUCKET }}${{ env.TARGET }}${GITHUB_REF/refs\/tags\//}/ # the version should be created in th the build job
340
+ run : aws s3 cp ArduinoCloudAgent .app_${{ matrix.arch }}_notarized.zip s3://${{ secrets.DOWNLOADS_BUCKET }}${{ env.TARGET }}${GITHUB_REF/refs\/tags\//}/ # the version should be created in th the build job
341
341
if : ${{ needs.build.outputs.prerelease != 'true' }}
342
342
343
343
- name : Generate json file used for the new autoupdate
344
344
run : |
345
345
cat > darwin-${{ matrix.arch }}-bundle.json <<EOF
346
346
{
347
347
"Version": "${GITHUB_REF/refs\/tags\//}",
348
- "Sha256": "$(shasum -a 256 ArduinoCreateAgent .app_${{ matrix.arch }}_notarized.zip | awk '{print $1}' | xxd -r -p | base64)"
348
+ "Sha256": "$(shasum -a 256 ArduinoCloudAgent .app_${{ matrix.arch }}_notarized.zip | awk '{print $1}' | xxd -r -p | base64)"
349
349
}
350
350
EOF
351
351
if : ${{ needs.build.outputs.prerelease != 'true' }}
@@ -358,8 +358,8 @@ jobs:
358
358
- name : Upload artifact
359
359
uses : actions/upload-artifact@v4
360
360
with :
361
- name : ArduinoCreateAgent .app_${{ matrix.arch }}_notarized
362
- path : ArduinoCreateAgent .app_${{ matrix.arch }}_notarized.zip
361
+ name : ArduinoCloudAgent .app_${{ matrix.arch }}_notarized
362
+ path : ArduinoCloudAgent .app_${{ matrix.arch }}_notarized.zip
363
363
if-no-files-found : error
364
364
365
365
# This job is responsible for generating the installers (using installbuilder)
@@ -424,15 +424,18 @@ jobs:
424
424
- name : Launch Bitrock installbuilder
425
425
run : ${{ env.INSTALLBUILDER_PATH }} build installer.xml ${{ matrix.installbuilder-name }} --verbose --license /tmp/license.xml --setvars ${{ env.INSTALLER_VARS }} architecture=${{ matrix.arch }}
426
426
427
+ - name : Rename installer to ArduinoCloudAgent
428
+ run : mv -v ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.platform-name }}-${{ matrix.arch }}-installer${{matrix.installer-extension}} ArduinoCloudAgent-${GITHUB_REF##*/}-${{ matrix.platform-name }}-${{ matrix.arch }}-installer${{matrix.installer-extension}}
429
+
427
430
- name : Generate archive
428
- run : tar -czvf ArduinoCreateAgent -${GITHUB_REF##*/}-${{ matrix.platform-name }}-${{ matrix.arch }}-installer.tar.gz ArduinoCreateAgent -${GITHUB_REF##*/}-${{ matrix.platform-name }}-${{ matrix.arch }}-installer${{matrix.installer-extension}}
431
+ run : tar -czvf ArduinoCloudAgent -${GITHUB_REF##*/}-${{ matrix.platform-name }}-${{ matrix.arch }}-installer.tar.gz ArduinoCloudAgent -${GITHUB_REF##*/}-${{ matrix.platform-name }}-${{ matrix.arch }}-installer${{matrix.installer-extension}}
429
432
if : matrix.os == 'ubuntu-20.04'
430
433
431
434
- name : Upload artifacts
432
435
uses : actions/upload-artifact@v4
433
436
with :
434
- name : ArduinoCreateAgent -${{ matrix.platform-name }}-${{ matrix.arch }}
435
- path : ArduinoCreateAgent *
437
+ name : ArduinoCloudAgent -${{ matrix.platform-name }}-${{ matrix.arch }}
438
+ path : ArduinoCloudAgent *
436
439
if-no-files-found : error
437
440
438
441
# This job will sign the Windows installer
@@ -449,17 +452,17 @@ jobs:
449
452
# We are hardcoding the path for signtool because is not present on the windows PATH env var by default.
450
453
# Keep in mind that this path could change when upgrading to a new runner version
451
454
SIGNTOOL_PATH : " C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x86/signtool.exe"
452
-
455
+
453
456
strategy :
454
457
matrix :
455
458
arch : [amd64, 386]
456
-
459
+
457
460
steps :
458
461
- name : Download artifact
459
462
uses : actions/download-artifact@v4
460
463
with :
461
- name : ArduinoCreateAgent -windows-${{ matrix.arch }}
462
-
464
+ name : ArduinoCloudAgent -windows-${{ matrix.arch }}
465
+
463
466
- name : Save Win signing certificate to file
464
467
run : echo "${{ secrets.INSTALLER_CERT_WINDOWS_CER }}" | base64 --decode > ${{ env.INSTALLER_CERT_WINDOWS_CER}}
465
468
@@ -468,15 +471,15 @@ jobs:
468
471
CERT_PASSWORD : ${{ secrets.INSTALLER_CERT_WINDOWS_PASSWORD }}
469
472
CONTAINER_NAME : ${{ secrets.INSTALLER_CERT_WINDOWS_CONTAINER }}
470
473
# https://stackoverflow.com/questions/17927895/automate-extended-validation-ev-code-signing-with-safenet-etoken
471
- run : |
472
- "${{ env.SIGNTOOL_PATH }}" sign -d "Arduino Create Agent" -f ${{ env.INSTALLER_CERT_WINDOWS_CER}} -csp "eToken Base Cryptographic Provider" -k "[{{${{ env.CERT_PASSWORD }}}}]=${{ env.CONTAINER_NAME }}" -fd sha256 -tr http://timestamp.digicert.com -td SHA256 -v "ArduinoCreateAgent -${GITHUB_REF##*/}-windows-${{ matrix.arch }}-installer.exe"
474
+ run : |
475
+ "${{ env.SIGNTOOL_PATH }}" sign -d "Arduino Cloud Agent" -f ${{ env.INSTALLER_CERT_WINDOWS_CER}} -csp "eToken Base Cryptographic Provider" -k "[{{${{ env.CERT_PASSWORD }}}}]=${{ env.CONTAINER_NAME }}" -fd sha256 -tr http://timestamp.digicert.com -td SHA256 -v "ArduinoCloudAgent -${GITHUB_REF##*/}-windows-${{ matrix.arch }}-installer.exe"
473
476
474
477
- name : Upload artifacts
475
478
uses : actions/upload-artifact@v4
476
479
with :
477
480
if-no-files-found : error
478
- name : ArduinoCreateAgent -windows-${{ matrix.arch }}-signed
479
- path : ArduinoCreateAgent -*-windows-${{ matrix.arch }}-installer.exe
481
+ name : ArduinoCloudAgent -windows-${{ matrix.arch }}-signed
482
+ path : ArduinoCloudAgent -*-windows-${{ matrix.arch }}-installer.exe
480
483
481
484
# This job will generate a dmg mac installer, sign/notarize it.
482
485
generate-sign-dmg :
@@ -496,30 +499,30 @@ jobs:
496
499
- name : Download artifact
497
500
uses : actions/download-artifact@v4
498
501
with :
499
- name : ArduinoCreateAgent .app_${{ matrix.arch }}_notarized
500
- path : ArduinoCreateAgent .app
502
+ name : ArduinoCloudAgent .app_${{ matrix.arch }}_notarized
503
+ path : ArduinoCloudAgent .app
501
504
502
505
- name : unzip artifact
503
- working-directory : ArduinoCreateAgent .app
506
+ working-directory : ArduinoCloudAgent .app
504
507
run : |
505
- unzip ArduinoCreateAgent .app_${{ matrix.arch }}_notarized.zip
506
- rm ArduinoCreateAgent .app_${{ matrix.arch }}_notarized.zip
508
+ unzip ArduinoCloudAgent .app_${{ matrix.arch }}_notarized.zip
509
+ rm ArduinoCloudAgent .app_${{ matrix.arch }}_notarized.zip
507
510
508
511
- name : Install create-dmg
509
512
run : brew install create-dmg
510
513
511
514
- name : Genarate DMG
512
515
run : |
513
516
create-dmg \
514
- --volname "ArduinoCreateAgent " \
517
+ --volname "ArduinoCloudAgent " \
515
518
--background "installer_icons/background.tiff" \
516
519
--window-pos 200 120 \
517
520
--window-size 500 320 \
518
521
--icon-size 80 \
519
- --icon "ArduinoCreateAgent .app" 125 150 \
522
+ --icon "ArduinoCloudAgent .app" 125 150 \
520
523
--app-drop-link 375 150 \
521
- "ArduinoCreateAgent -${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg" \
522
- "ArduinoCreateAgent .app"
524
+ "ArduinoCloudAgent -${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg" \
525
+ "ArduinoCloudAgent .app"
523
526
524
527
- name : Import Code-Signing Certificates
525
528
run : |
@@ -549,7 +552,7 @@ jobs:
549
552
# gon does not allow env variables in config file (https://github.com/mitchellh/gon/issues/20)
550
553
run : |
551
554
cat > gon.config_installer.hcl <<EOF
552
- source = ["ArduinoCreateAgent -${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg"]
555
+ source = ["ArduinoCloudAgent -${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg"]
553
556
bundle_id = "cc.arduino.${{ env.PROJECT_NAME }}-installer"
554
557
555
558
sign {
@@ -558,7 +561,7 @@ jobs:
558
561
559
562
# Ask Gon for zip output to force notarization process to take place.
560
563
zip {
561
- output_path = "ArduinoCreateAgent .app_${{ matrix.arch }}_notarized.zip"
564
+ output_path = "ArduinoCloudAgent .app_${{ matrix.arch }}_notarized.zip"
562
565
}
563
566
EOF
564
567
@@ -567,13 +570,13 @@ jobs:
567
570
568
571
# tar dmg file to keep executable permission
569
572
- name : Tar files to keep permissions
570
- run : tar -cvf ArduinoCreateAgent -${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.tar ArduinoCreateAgent -${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg
573
+ run : tar -cvf ArduinoCloudAgent -${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.tar ArduinoCloudAgent -${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg
571
574
572
575
- name : Upload artifacts
573
576
uses : actions/upload-artifact@v4
574
577
with :
575
- name : ArduinoCreateAgent -osx-${{ matrix.arch }}
576
- path : ArduinoCreateAgent *.tar
578
+ name : ArduinoCloudAgent -osx-${{ matrix.arch }}
579
+ path : ArduinoCloudAgent *.tar
577
580
if-no-files-found : error
578
581
579
582
create-release :
@@ -594,11 +597,11 @@ jobs:
594
597
- name : prepare artifacts for the release
595
598
run : |
596
599
mkdir release
597
- chmod -v +x ArduinoCreateAgent -linux-amd64/*.run
598
- mv -v ArduinoCreateAgent -linux-amd64/* release/
599
- cat ArduinoCreateAgent -osx-amd64/*.tar | tar -xvf - -i -C release/
600
- rm -v release/._ArduinoCreateAgent *.dmg
601
- mv -v ArduinoCreateAgent -windows*-signed/* release/
600
+ chmod -v +x ArduinoCloudAgent -linux-amd64/*.run
601
+ mv -v ArduinoCloudAgent -linux-amd64/* release/
602
+ cat ArduinoCloudAgent -osx-amd64/*.tar | tar -xvf - -i -C release/
603
+ rm -v release/._ArduinoCloudAgent *.dmg
604
+ mv -v ArduinoCloudAgent -windows*-signed/* release/
602
605
603
606
- name : VirusTotal Scan
604
607
id : virustotal_step
0 commit comments