mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-05-11 03:39:59 +02:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4fab90d5b9 | ||
|
|
f67df92f0e | ||
|
|
7e2c2cccf8 |
41
.github/workflows/windows-build.yml
vendored
41
.github/workflows/windows-build.yml
vendored
@@ -316,11 +316,30 @@ jobs:
|
||||
nsis_root/files/bin/
|
||||
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)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
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
|
||||
|
||||
- name: Upload NSIS installer
|
||||
@@ -354,6 +373,13 @@ jobs:
|
||||
name: qelectrotech-windows-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
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
@@ -372,7 +398,9 @@ jobs:
|
||||
> For stable releases, see the [Releases page](https://github.com/${{ github.repository }}/releases).
|
||||
prerelease: true
|
||||
make_latest: false
|
||||
files: downloaded/installer/*.exe
|
||||
files: |
|
||||
downloaded/installer/*.exe
|
||||
downloaded/portable/*.zip
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Generate download page (index.html)
|
||||
@@ -384,6 +412,8 @@ jobs:
|
||||
RUN_URL="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
|
||||
EXE_NAME=$(ls downloaded/installer/*.exe | xargs -I{} basename {})
|
||||
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
|
||||
cat > gh-pages/index.html << HTMLEOF
|
||||
@@ -526,6 +556,13 @@ jobs:
|
||||
<small>.exe — recommended, includes all dependencies</small>
|
||||
</span>
|
||||
</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">
|
||||
<span class="btn-icon">📦</span>
|
||||
<span class="btn-text">
|
||||
|
||||
Reference in New Issue
Block a user