Update windows-msi.yml

This commit is contained in:
Laurent Trinques
2026-05-14 09:26:01 +02:00
committed by GitHub
parent 6a7ae44ce5
commit 93baa00d00

View File

@@ -1,10 +1,16 @@
name: Windows MSI (WiX v7) name: Windows MSI (WiX v7)
on: on:
# Déclenché automatiquement après un build Windows réussi sur master
workflow_run:
workflows: ["Windows Build"]
types: [completed]
branches: [master]
# Toujours possible de lancer manuellement (ex: pour un run_id spécifique)
workflow_dispatch: workflow_dispatch:
inputs: inputs:
run_id: run_id:
description: "Run ID of 'Windows Build' (leave empty for the latest successful run)" description: "Run ID of 'Windows Build' (leave empty for automatic)"
required: false required: false
default: "" default: ""
@@ -12,6 +18,10 @@ jobs:
build-msi: build-msi:
name: Build MSI with WiX v7 name: Build MSI with WiX v7
runs-on: windows-latest runs-on: windows-latest
# Ne tourne que si le workflow Windows Build a réussi (ou si c'est manuel)
if: >
github.event_name == 'workflow_dispatch' ||
github.event.workflow_run.conclusion == 'success'
steps: steps:
# ---------------------------------------------------------------- # ----------------------------------------------------------------
@@ -32,7 +42,9 @@ jobs:
with: with:
name: qelectrotech-windows-portable name: qelectrotech-windows-portable
path: artifact\files path: artifact\files
run-id: ${{ github.event.inputs.run_id || github.run_id }} # workflow_run => utilise l'ID du run déclencheur
# workflow_dispatch => utilise l'input run_id si fourni, sinon le run courant
run-id: ${{ github.event.workflow_run.id || github.event.inputs.run_id || github.run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }} repository: ${{ github.repository }}
@@ -122,6 +134,10 @@ jobs:
# Search for qelectrotech.exe in the artifact # Search for qelectrotech.exe in the artifact
$exe = Get-ChildItem -Path "artifact\files" -Filter "qelectrotech.exe" -Recurse | Select-Object -First 1 $exe = Get-ChildItem -Path "artifact\files" -Filter "qelectrotech.exe" -Recurse | Select-Object -First 1
if (-not $exe) {
# Also try QElectroTech.exe (capital Q)
$exe = Get-ChildItem -Path "artifact\files" -Filter "QElectroTech.exe" -Recurse | Select-Object -First 1
}
if (-not $exe) { if (-not $exe) {
Write-Error "qelectrotech.exe not found in artifact" Write-Error "qelectrotech.exe not found in artifact"
exit 1 exit 1