mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-05-11 11:49:58 +02:00
Update windows-build.yml
Use 7-Zip is already installed on all GitHub Windows computers (C:\Program Files\7-Zip\7z.exe), and it is much faster than Compress-Archive when dealing with 9,931 files.
This commit is contained in:
26
.github/workflows/windows-build.yml
vendored
26
.github/workflows/windows-build.yml
vendored
@@ -317,17 +317,23 @@ jobs:
|
|||||||
if-no-files-found: warn
|
if-no-files-found: warn
|
||||||
|
|
||||||
- name: Zip portable (readytouse)
|
- name: Zip portable (readytouse)
|
||||||
shell: msys2 {0}
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
VERSION="${{ steps.qet_version.outputs.base_version }}"
|
|
||||||
HEAD="${{ steps.qet_version.outputs.head }}"
|
|
||||||
ZIP_NAME="qelectrotech-${VERSION}+git${HEAD}-x86-win64-readytouse.zip"
|
|
||||||
cd "$GITHUB_WORKSPACE/nsis_root/files"
|
|
||||||
zip -r "$GITHUB_WORKSPACE/dist/$ZIP_NAME" .
|
|
||||||
echo "ZIP created: $ZIP_NAME ($(du -sh "$GITHUB_WORKSPACE/dist/$ZIP_NAME" | cut -f1))"
|
|
||||||
echo "zip_name=$ZIP_NAME" >> "$GITHUB_OUTPUT"
|
|
||||||
id: zip_portable
|
id: zip_portable
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$version = "${{ steps.qet_version.outputs.base_version }}"
|
||||||
|
$head = "${{ steps.qet_version.outputs.head }}"
|
||||||
|
$zipName = "qelectrotech-${version}+git${head}-x86-win64-readytouse.zip"
|
||||||
|
$src = "$env:GITHUB_WORKSPACE\nsis_root\files"
|
||||||
|
$dst = "$env:GITHUB_WORKSPACE\dist\$zipName"
|
||||||
|
$7z = "C:\Program Files\7-Zip\7z.exe"
|
||||||
|
|
||||||
|
New-Item -ItemType Directory -Force -Path "$env:GITHUB_WORKSPACE\dist" | Out-Null
|
||||||
|
& $7z a -tzip -mx=5 -mmt=on $dst "$src\*"
|
||||||
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||||
|
|
||||||
|
$sizeMB = [math]::Round((Get-Item $dst).Length / 1MB, 1)
|
||||||
|
Write-Output "ZIP created: $zipName ($sizeMB MB)"
|
||||||
|
"zip_name=$zipName" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
|
||||||
|
|
||||||
- name: Upload portable (files/ without installer)
|
- name: Upload portable (files/ without installer)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user