Skip to content

Build Windows Beta Installer #2

Build Windows Beta Installer

Build Windows Beta Installer #2

name: Build Windows Beta Installer
on:
workflow_dispatch:
push:
tags:
- "v*"
permissions:
contents: read
jobs:
build-windows-installer:
runs-on: windows-latest
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Install Python dependencies
shell: powershell
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install Inno Setup
shell: powershell
run: |
choco install innosetup --no-progress -y
- name: Resolve installer metadata
id: meta
shell: powershell
run: |
$appVersion = (python -c "from utils.license_manager import APP_VERSION; print(APP_VERSION)" | Out-String).Trim()
if (-not $appVersion) {
throw "APP_VERSION could not be resolved."
}
$installerFile = "ThermoAnalyzer_Beta_Setup_$appVersion.exe"
"app_version=$appVersion" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
"installer_file=$installerFile" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
- name: Build Windows beta installer
shell: powershell
run: |
powershell -ExecutionPolicy Bypass -File packaging\windows\build_beta_installer.ps1
- name: Verify installer output exists
shell: powershell
run: |
$installerPath = Join-Path (Resolve-Path .\release) "${{ steps.meta.outputs.installer_file }}"
if (-not (Test-Path $installerPath)) {
throw "Expected installer was not found: $installerPath"
}
Write-Host "Installer ready: $installerPath"
- name: Upload installer artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.meta.outputs.installer_file }}
path: release/${{ steps.meta.outputs.installer_file }}
if-no-files-found: error