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 82e1fcb

Browse files
committedJun 29, 2024·
produced signed artifacts without suffixes
1 parent 428a8c1 commit 82e1fcb

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed
 

‎.github/workflows/build.yml

+17-15
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,16 @@ env:
7575
artifacts:
7676
- path: '*Windows_64bit.exe'
7777
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
8080
- path: '*Windows_64bit.msi'
8181
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
8484
- path: '*Windows_64bit.zip'
8585
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
8888
- config:
8989
name: Linux
9090
runs-on: ubuntu-latest
@@ -446,22 +446,24 @@ jobs:
446446
FILENAME=$(basename "$ARTIFACT")
447447
BASE_NAME="${FILENAME%.*}"
448448
EXTENSION="${FILENAME##*.}"
449+
# Remove '_unsigned' from the base name if it exists
450+
SIGNED_BASE_NAME="${BASE_NAME/_unsigned/}"
449451
450452
# Sign and rename EXE and MSI files
451453
if [[ "$EXTENSION" == "exe" || "$EXTENSION" == "msi" ]]; then
452454
echo "Signing $ARTIFACT"
453455
"${{ 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}"
455457
mv "$ARTIFACT" "$SIGNED_ARTIFACT_PATH"
456458
echo "Renamed $ARTIFACT to $SIGNED_ARTIFACT_PATH"
457459
fi
458460
459-
# Unzip, Sign, and Rezip ZIP file with new name
461+
# Unzip, Sign, and Rezip ZIP file without '_unsigned' in the name
460462
if [[ "$EXTENSION" == "zip" ]]; then
461463
TEMP_DIR=$(mktemp -d)
462464
unzip "$ARTIFACT" -d "$TEMP_DIR"
463465
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}"
465467
pushd "$TEMP_DIR"
466468
zip -r "$SIGNED_ARTIFACT_PATH" .
467469
popd
@@ -473,21 +475,21 @@ jobs:
473475
- name: Upload signed EXE
474476
uses: actions/upload-artifact@v3
475477
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
478480

479481
- name: Upload signed MSI
480482
uses: actions/upload-artifact@v3
481483
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
484486

485487

486488
- name: Upload signed ZIP
487489
uses: actions/upload-artifact@v3
488490
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
491493

492494
# This step is needed because the self hosted runner does not delete files automatically
493495
- name: Clean up artifacts

‎electron-app/scripts/package.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ async function getArtifactName(version) {
100100
switch (platform) {
101101
case 'win32': {
102102
if (arch === 'x64') {
103-
return `${name}_${version}_Windows_64bit.\$\{ext}`;
103+
return `${name}_${version}_Windows_64bit_unsigned.\$\{ext}`;
104104
}
105105
throw new Error(`Unsupported platform, arch: ${platform}, ${arch}`);
106106
}

0 commit comments

Comments
 (0)
Please sign in to comment.