Compare commits

...

3 Commits

Author SHA1 Message Date
Laurent Trinques
4fab90d5b9 Update windows-build.yml
Some checks are pending
Windows Build / build-windows (push) Waiting to run
Windows Build / deploy-pages (push) Blocked by required conditions
2026-05-10 21:27:10 +02:00
Laurent Trinques
f67df92f0e Update windows-build.yml
Some checks failed
Windows Build / build-windows (push) Has been cancelled
Windows Build / deploy-pages (push) Has been cancelled
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.
2026-05-10 13:04:31 +02:00
Laurent Trinques
7e2c2cccf8 Update windows-build.yml
Add Ready_to_use packages
2026-05-10 12:42:30 +02:00

View File

@@ -316,11 +316,30 @@ jobs:
nsis_root/files/bin/ nsis_root/files/bin/
if-no-files-found: warn if-no-files-found: warn
- name: Zip portable (readytouse)
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
with: with:
name: qelectrotech-${{ steps.qet_version.outputs.base_version }}+git${{ steps.qet_version.outputs.head }}-x86-win64-readytouse name: qelectrotech-${{ steps.qet_version.outputs.base_version }}+git${{ steps.qet_version.outputs.head }}-x86-win64-readytouse
path: nsis_root/files/ path: dist/${{ steps.zip_portable.outputs.zip_name }}
retention-days: 14 retention-days: 14
- name: Upload NSIS installer - name: Upload NSIS installer
@@ -354,6 +373,13 @@ jobs:
name: qelectrotech-windows-installer name: qelectrotech-windows-installer
path: downloaded/installer/ path: downloaded/installer/
- name: Download portable artifact
uses: actions/download-artifact@v4
with:
pattern: qelectrotech-*-readytouse
path: downloaded/portable/
merge-multiple: true
- name: Update nightly release - name: Update nightly release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
@@ -372,7 +398,9 @@ jobs:
> For stable releases, see the [Releases page](https://github.com/${{ github.repository }}/releases). > For stable releases, see the [Releases page](https://github.com/${{ github.repository }}/releases).
prerelease: true prerelease: true
make_latest: false make_latest: false
files: downloaded/installer/*.exe files: |
downloaded/installer/*.exe
downloaded/portable/*.zip
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate download page (index.html) - name: Generate download page (index.html)
@@ -384,6 +412,8 @@ jobs:
RUN_URL="https://github.com/$REPO/actions/runs/${{ github.run_id }}" RUN_URL="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
EXE_NAME=$(ls downloaded/installer/*.exe | xargs -I{} basename {}) EXE_NAME=$(ls downloaded/installer/*.exe | xargs -I{} basename {})
INSTALLER_URL="https://github.com/$REPO/releases/download/nightly/$EXE_NAME" INSTALLER_URL="https://github.com/$REPO/releases/download/nightly/$EXE_NAME"
ZIP_NAME=$(ls downloaded/portable/*.zip | xargs -I{} basename {})
PORTABLE_URL="https://github.com/$REPO/releases/download/nightly/$ZIP_NAME"
mkdir -p gh-pages mkdir -p gh-pages
cat > gh-pages/index.html << HTMLEOF cat > gh-pages/index.html << HTMLEOF
@@ -526,6 +556,13 @@ jobs:
<small>.exe — recommended, includes all dependencies</small> <small>.exe — recommended, includes all dependencies</small>
</span> </span>
</a> </a>
<a class="btn btn-secondary" href="$PORTABLE_URL">
<span class="btn-icon">📦</span>
<span class="btn-text">
Windows Portable
<small>.zip — no installation required, extract and run the file "Lancer QET.bat"</small>
</span>
</a>
<a class="btn btn-secondary" href="https://github.com/$REPO/releases/tag/nightly"> <a class="btn btn-secondary" href="https://github.com/$REPO/releases/tag/nightly">
<span class="btn-icon">📦</span> <span class="btn-icon">📦</span>
<span class="btn-text"> <span class="btn-text">