Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f4acce6

Browse files
committedJun 17, 2024
Update name in release workflow
1 parent 04fae88 commit f4acce6

File tree

1 file changed

+46
-43
lines changed

1 file changed

+46
-43
lines changed
 

‎.github/workflows/release.yml

+46-43
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111

1212
env:
1313
# As defined by the Taskfile's PROJECT_NAME variable
14-
PROJECT_NAME: arduino-create-agent
14+
PROJECT_NAME: arduino-cloud-agent
1515
TARGET: "/CreateAgent/Stable/"
1616
VERSION_TARGET: "arduino-create-static/agent-metadata/"
1717
AWS_REGION: "us-east-1" # or https://github.com/aws/aws-cli/issues/5623
@@ -186,8 +186,8 @@ jobs:
186186
- name: Make executable
187187
run: chmod -v +x ${{ env.EXE_PATH }}${{ env.PROJECT_NAME }}
188188

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
191191

192192
- name: get year
193193
run: echo "YEAR=$(date "+%Y")" >> $GITHUB_ENV
@@ -199,8 +199,8 @@ jobs:
199199
200200
<key>CFBundleIconFile</key> <string>AppIcon.icns</string>
201201
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>
204204
<key>CFBundleIdentifier</key> <string>create.arduino.cc</string>
205205
206206
<key>CFBundleVersion</key> <string>${GITHUB_REF##*/}</string>
@@ -215,14 +215,14 @@ jobs:
215215
EOF
216216
217217
- 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/ .
219219

220220
- name: Upload artifacts
221221
uses: actions/upload-artifact@v4
222222
with:
223223
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
226226

227227
# 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.
228228
notarize-macos:
@@ -243,10 +243,10 @@ jobs:
243243
- name: Download artifact
244244
uses: actions/download-artifact@v4
245245
with:
246-
name: ArduinoCreateAgent.app_${{ matrix.arch }}
246+
name: ArduinoCloudAgent.app_${{ matrix.arch }}
247247

248248
- name: un-Tar bundle
249-
run: tar -xvf ArduinoCreateAgent.app_${{ matrix.arch }}.tar
249+
run: tar -xvf ArduinoCloudAgent.app_${{ matrix.arch }}.tar
250250

251251
- name: Import Code-Signing Certificates
252252
run: |
@@ -300,7 +300,7 @@ jobs:
300300
run: gon -log-level=debug -log-json "${{ env.GON_CONFIG_PATH }}"
301301

302302
- name: Zip output app bundle
303-
run: ditto -c -k ArduinoCreateAgent.app/ ArduinoCreateAgent.app_${{ matrix.arch }}_notarized.zip
303+
run: ditto -c -k ArduinoCreateAgent.app/ ArduinoCloudAgent.app_${{ matrix.arch }}_notarized.zip
304304

305305
- name: Remove gon used for code signing
306306
run: |
@@ -318,7 +318,7 @@ jobs:
318318
# See: https://github.com/Bearer/gon#configuration-file
319319
320320
notarize {
321-
path = "ArduinoCreateAgent.app_${{ matrix.arch }}_notarized.zip"
321+
path = "ArduinoCloudAgent.app_${{ matrix.arch }}_notarized.zip"
322322
bundle_id = "cc.arduino.${{ env.PROJECT_NAME }}"
323323
}
324324
@@ -337,15 +337,15 @@ jobs:
337337
if: ${{ needs.build.outputs.prerelease != 'true' }}
338338

339339
- 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
341341
if: ${{ needs.build.outputs.prerelease != 'true' }}
342342

343343
- name: Generate json file used for the new autoupdate
344344
run: |
345345
cat > darwin-${{ matrix.arch }}-bundle.json <<EOF
346346
{
347347
"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)"
349349
}
350350
EOF
351351
if: ${{ needs.build.outputs.prerelease != 'true' }}
@@ -358,8 +358,8 @@ jobs:
358358
- name: Upload artifact
359359
uses: actions/upload-artifact@v4
360360
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
363363
if-no-files-found: error
364364

365365
# This job is responsible for generating the installers (using installbuilder)
@@ -424,15 +424,18 @@ jobs:
424424
- name: Launch Bitrock installbuilder
425425
run: ${{ env.INSTALLBUILDER_PATH }} build installer.xml ${{ matrix.installbuilder-name }} --verbose --license /tmp/license.xml --setvars ${{ env.INSTALLER_VARS }} architecture=${{ matrix.arch }}
426426

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+
427430
- 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}}
429432
if: matrix.os == 'ubuntu-20.04'
430433

431434
- name: Upload artifacts
432435
uses: actions/upload-artifact@v4
433436
with:
434-
name: ArduinoCreateAgent-${{ matrix.platform-name }}-${{ matrix.arch }}
435-
path: ArduinoCreateAgent*
437+
name: ArduinoCloudAgent-${{ matrix.platform-name }}-${{ matrix.arch }}
438+
path: ArduinoCloudAgent*
436439
if-no-files-found: error
437440

438441
# This job will sign the Windows installer
@@ -458,7 +461,7 @@ jobs:
458461
- name: Download artifact
459462
uses: actions/download-artifact@v4
460463
with:
461-
name: ArduinoCreateAgent-windows-${{ matrix.arch }}
464+
name: ArduinoCloudAgent-windows-${{ matrix.arch }}
462465

463466
- name: Save Win signing certificate to file
464467
run: echo "${{ secrets.INSTALLER_CERT_WINDOWS_CER }}" | base64 --decode > ${{ env.INSTALLER_CERT_WINDOWS_CER}}
@@ -469,18 +472,18 @@ jobs:
469472
CONTAINER_NAME: ${{ secrets.INSTALLER_CERT_WINDOWS_CONTAINER }}
470473
# https://stackoverflow.com/questions/17927895/automate-extended-validation-ev-code-signing-with-safenet-etoken
471474
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"
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"
473476
474477
- name: Upload artifacts
475478
uses: actions/upload-artifact@v4
476479
with:
477480
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
480483

481484
# This step is needed because the self hosted runner does not delete files automatically
482485
- name: Clean up EXE
483-
run: rm ArduinoCreateAgent-*-windows-${{ matrix.arch }}-installer.exe
486+
run: rm ArduinoCloudAgent-*-windows-${{ matrix.arch }}-installer.exe
484487

485488
# This job will generate a dmg mac installer, sign/notarize it.
486489
generate-sign-dmg:
@@ -500,30 +503,30 @@ jobs:
500503
- name: Download artifact
501504
uses: actions/download-artifact@v4
502505
with:
503-
name: ArduinoCreateAgent.app_${{ matrix.arch }}_notarized
504-
path: ArduinoCreateAgent.app
506+
name: ArduinoCloudAgent.app_${{ matrix.arch }}_notarized
507+
path: ArduinoCloudAgent.app
505508

506509
- name: unzip artifact
507-
working-directory: ArduinoCreateAgent.app
510+
working-directory: ArduinoCloudAgent.app
508511
run: |
509-
unzip ArduinoCreateAgent.app_${{ matrix.arch }}_notarized.zip
510-
rm ArduinoCreateAgent.app_${{ matrix.arch }}_notarized.zip
512+
unzip ArduinoCloudAgent.app_${{ matrix.arch }}_notarized.zip
513+
rm ArduinoCloudAgent.app_${{ matrix.arch }}_notarized.zip
511514
512515
- name: Install create-dmg
513516
run: brew install create-dmg
514517

515518
- name: Genarate DMG
516519
run: |
517520
create-dmg \
518-
--volname "ArduinoCreateAgent" \
521+
--volname "ArduinoCloudAgent" \
519522
--background "installer_icons/background.tiff" \
520523
--window-pos 200 120 \
521524
--window-size 500 320 \
522525
--icon-size 80 \
523-
--icon "ArduinoCreateAgent.app" 125 150 \
526+
--icon "ArduinoCloudAgent.app" 125 150 \
524527
--app-drop-link 375 150 \
525-
"ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg" \
526-
"ArduinoCreateAgent.app"
528+
"ArduinoCloudAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg" \
529+
"ArduinoCloudAgent.app"
527530
528531
- name: Import Code-Signing Certificates
529532
run: |
@@ -553,7 +556,7 @@ jobs:
553556
# gon does not allow env variables in config file (https://github.com/mitchellh/gon/issues/20)
554557
run: |
555558
cat > gon.config_installer.hcl <<EOF
556-
source = ["ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg"]
559+
source = ["ArduinoCloudAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg"]
557560
bundle_id = "cc.arduino.${{ env.PROJECT_NAME }}-installer"
558561
559562
sign {
@@ -562,7 +565,7 @@ jobs:
562565
563566
# Ask Gon for zip output to force notarization process to take place.
564567
zip {
565-
output_path = "ArduinoCreateAgent.app_${{ matrix.arch }}_notarized.zip"
568+
output_path = "ArduinoCloudAgent.app_${{ matrix.arch }}_notarized.zip"
566569
}
567570
EOF
568571
@@ -571,13 +574,13 @@ jobs:
571574

572575
# tar dmg file to keep executable permission
573576
- name: Tar files to keep permissions
574-
run: tar -cvf ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.tar ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg
577+
run: tar -cvf ArduinoCloudAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.tar ArduinoCloudAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg
575578

576579
- name: Upload artifacts
577580
uses: actions/upload-artifact@v4
578581
with:
579-
name: ArduinoCreateAgent-osx-${{ matrix.arch }}
580-
path: ArduinoCreateAgent*.tar
582+
name: ArduinoCloudAgent-osx-${{ matrix.arch }}
583+
path: ArduinoCloudAgent*.tar
581584
if-no-files-found: error
582585

583586
create-release:
@@ -598,11 +601,11 @@ jobs:
598601
- name: prepare artifacts for the release
599602
run: |
600603
mkdir release
601-
chmod -v +x ArduinoCreateAgent-linux-amd64/*.run
602-
mv -v ArduinoCreateAgent-linux-amd64/* release/
603-
cat ArduinoCreateAgent-osx-amd64/*.tar | tar -xvf - -i -C release/
604-
rm -v release/._ArduinoCreateAgent*.dmg
605-
mv -v ArduinoCreateAgent-windows*-signed/* release/
604+
chmod -v +x ArduinoCloudAgent-linux-amd64/*.run
605+
mv -v ArduinoCloudAgent-linux-amd64/* release/
606+
cat ArduinoCloudAgent-osx-amd64/*.tar | tar -xvf - -i -C release/
607+
rm -v release/._ArduinoCloudAgent*.dmg
608+
mv -v ArduinoCloudAgent-windows*-signed/* release/
606609
607610
- name: VirusTotal Scan
608611
id: virustotal_step

0 commit comments

Comments
 (0)
Please sign in to comment.