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 c547c7b

Browse files
committedJun 29, 2024·
refine zipping
1 parent 22e4886 commit c547c7b

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed
 

‎.github/workflows/build.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ jobs:
445445
# https://stackoverflow.com/questions/17927895/automate-extended-validation-ev-code-signing-with-safenet-etoken
446446
run: |
447447
shopt -s nullglob
448-
for ARTIFACT in "${{ env.BUILD_ARTIFACTS_PATH }}"/*_unsigned.{exe,zip,msi}; do
448+
for ARTIFACT in "${{ env.BUILD_ARTIFACTS_PATH }}"/*_unsigned.{exe,msi}; do
449449
echo "Processing $ARTIFACT"
450450
FILENAME=$(basename "$ARTIFACT")
451451
BASE_NAME="${FILENAME%.*}"
@@ -472,23 +472,25 @@ jobs:
472472
run: |
473473
@echo off
474474
setlocal enabledelayedexpansion
475-
475+
476476
for /r %%i in (*_unsigned.zip) do (
477477
set "zipfile=%%i"
478478
goto :break
479479
)
480480
:break
481-
481+
482482
set "dirname=!zipfile:_unsigned.zip=!"
483483
set "newzipfile=!dirname!.zip"
484-
484+
485485
mkdir "!dirname!"
486486
tar -xf "!zipfile!" -C "!dirname!"
487487
488-
"%SIGNTOOL_PATH%" sign -d "Arduino IDE" -f "%INSTALLER_CERT_WINDOWS_CER%" -csp "eToken Base Cryptographic Provider" -k "%CERT_PASSWORD%" -fd sha256 -tr http://timestamp.digicert.com -td SHA256 -v "!dirname!\Arduino IDE.exe"
489-
490-
tar -a -cf "!newzipfile!" "!dirname!"
491-
488+
"%SIGNTOOL_PATH%" sign -d "Arduino IDE" -f "%INSTALLER_CERT_WINDOWS_CER%" -csp "eToken Base Cryptographic Provider" -k "%CERT_PASSWORD%" -kc "%CONTAINER_NAME%" -fd sha256 -tr http://timestamp.digicert.com -td SHA256 -v "!dirname!\Arduino IDE.exe"
489+
490+
cd "!dirname!"
491+
tar -a -cf "../!newzipfile!" .
492+
cd ..
493+
492494
rmdir /s /q "!dirname!"
493495
494496
- name: Upload signed EXE
@@ -503,7 +505,6 @@ jobs:
503505
name: Windows_X86-64_MSI
504506
path: ${{ env.BUILD_ARTIFACTS_PATH }}/*Windows_64bit.msi
505507

506-
507508
- name: Upload signed ZIP
508509
uses: actions/upload-artifact@v3
509510
with:

0 commit comments

Comments
 (0)
Please sign in to comment.