Skip to content

Commit 860535a

Browse files
use 7zip
1 parent 238b0d9 commit 860535a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,10 @@ jobs:
431431
SIGNTOOL_PATH: "C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x86/signtool.exe"
432432

433433
steps:
434+
- name: Install 7-Zip
435+
run: choco install 7zip
436+
shell: pwsh
437+
434438
- name: Download artifact
435439
uses: actions/download-artifact@v3
436440
with:
@@ -465,11 +469,11 @@ jobs:
465469
# Unzip, Sign, and Rezip ZIP file without '_unsigned' in the name
466470
if [[ "$EXTENSION" == "zip" ]]; then
467471
TEMP_DIR=$(mktemp -d)
468-
unzip "$ARTIFACT" -d "$TEMP_DIR"
469-
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 {} \;
472+
7z x "$ARTIFACT" -o "$TEMP_DIR"
473+
find "$TEMP_DIR" -type f -name 'Arduino IDE.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 {} \;
470474
SIGNED_ARTIFACT_PATH="${{ env.BUILD_ARTIFACTS_PATH }}/${SIGNED_BASE_NAME}.${EXTENSION}"
471475
pushd "$TEMP_DIR"
472-
zip -r "$SIGNED_ARTIFACT_PATH" .
476+
7z a "$SIGNED_ARTIFACT_PATH" "$TEMP_DIR\*"
473477
popd
474478
rm -rf "$TEMP_DIR"
475479
echo "Processed and re-zipped $ARTIFACT"

0 commit comments

Comments
 (0)