75
75
artifacts:
76
76
- path: '*Windows_64bit.exe'
77
77
name: Windows_X86-64_interactive_installer
78
- - path: '*Windows_64bit_signed .exe'
79
- name: Windows_X86-64_interactive_installer_signed
78
+ - path: '*Windows_64bit_unsigned .exe'
79
+ name: Windows_X86-64_interactive_installer_unsigned
80
80
- path: '*Windows_64bit.msi'
81
81
name: Windows_X86-64_MSI
82
- - path: '*Windows_64bit_signed .msi'
83
- name: Windows_X86-64_MSI_signed
82
+ - path: '*Windows_64bit_unsigned .msi'
83
+ name: Windows_X86-64_MSI_unsigned
84
84
- path: '*Windows_64bit.zip'
85
85
name: Windows_X86-64_zip
86
- - path: '*Windows_64bit_signed .zip'
87
- name: Windows_X86-64_zip_signed
86
+ - path: '*Windows_64bit_unsigned .zip'
87
+ name: Windows_X86-64_zip_unsigned
88
88
- config:
89
89
name: Linux
90
90
runs-on: ubuntu-latest
@@ -446,22 +446,24 @@ jobs:
446
446
FILENAME=$(basename "$ARTIFACT")
447
447
BASE_NAME="${FILENAME%.*}"
448
448
EXTENSION="${FILENAME##*.}"
449
+ # Remove '_unsigned' from the base name if it exists
450
+ SIGNED_BASE_NAME="${BASE_NAME/_unsigned/}"
449
451
450
452
# Sign and rename EXE and MSI files
451
453
if [[ "$EXTENSION" == "exe" || "$EXTENSION" == "msi" ]]; then
452
454
echo "Signing $ARTIFACT"
453
455
"${{ env.SIGNTOOL_PATH }}" sign -d "Arduino IDE" -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 "$ARTIFACT"
454
- SIGNED_ARTIFACT_PATH="${{ env.BUILD_ARTIFACTS_PATH }}/${BASE_NAME}_signed .${EXTENSION}"
456
+ SIGNED_ARTIFACT_PATH="${{ env.BUILD_ARTIFACTS_PATH }}/${SIGNED_BASE_NAME} .${EXTENSION}"
455
457
mv "$ARTIFACT" "$SIGNED_ARTIFACT_PATH"
456
458
echo "Renamed $ARTIFACT to $SIGNED_ARTIFACT_PATH"
457
459
fi
458
460
459
- # Unzip, Sign, and Rezip ZIP file with new name
461
+ # Unzip, Sign, and Rezip ZIP file without '_unsigned' in the name
460
462
if [[ "$EXTENSION" == "zip" ]]; then
461
463
TEMP_DIR=$(mktemp -d)
462
464
unzip "$ARTIFACT" -d "$TEMP_DIR"
463
465
find "$TEMP_DIR" -type f -name '*.exe' -exec "${{ env.SIGNTOOL_PATH }}" sign -d "Arduino IDE" -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 {} \;
464
- SIGNED_ARTIFACT_PATH="${{ env.BUILD_ARTIFACTS_PATH }}/${BASE_NAME}_signed.zip "
466
+ SIGNED_ARTIFACT_PATH="${{ env.BUILD_ARTIFACTS_PATH }}/${SIGNED_BASE_NAME}.${EXTENSION} "
465
467
pushd "$TEMP_DIR"
466
468
zip -r "$SIGNED_ARTIFACT_PATH" .
467
469
popd
@@ -473,21 +475,21 @@ jobs:
473
475
- name : Upload signed EXE
474
476
uses : actions/upload-artifact@v3
475
477
with :
476
- name : Windows_X86-64_interactive_installer_signed
477
- path : ${{ env.BUILD_ARTIFACTS_PATH }}/*_signed .exe
478
+ name : Windows_X86-64_interactive_installer
479
+ path : ${{ env.BUILD_ARTIFACTS_PATH }}/*Windows_64bit .exe
478
480
479
481
- name : Upload signed MSI
480
482
uses : actions/upload-artifact@v3
481
483
with :
482
- name : Windows_X86-64_MSI_signed
483
- path : ${{ env.BUILD_ARTIFACTS_PATH }}/*_signed .msi
484
+ name : Windows_X86-64_MSI
485
+ path : ${{ env.BUILD_ARTIFACTS_PATH }}/*Windows_64bit .msi
484
486
485
487
486
488
- name : Upload signed ZIP
487
489
uses : actions/upload-artifact@v3
488
490
with :
489
- name : Windows_X86-64_interactive_installer_signed
490
- path : ${{ env.BUILD_ARTIFACTS_PATH }}/*_signed .zip
491
+ name : Windows_X86-64_zip
492
+ path : ${{ env.BUILD_ARTIFACTS_PATH }}/*Windows_64bit .zip
491
493
492
494
# This step is needed because the self hosted runner does not delete files automatically
493
495
- name : Clean up artifacts
0 commit comments