feat(installer): add Inno Setup packaging to release

- add installer/AnabasisManager.iss for per-user install without admin rights

- extend build.py to produce setup.exe via ISCC

- publish setup.exe and checksums in release workflow
This commit is contained in:
2026-02-15 22:01:47 +03:00
parent 1b4760167f
commit 965d09d47c
3 changed files with 138 additions and 6 deletions

View File

@@ -38,6 +38,24 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt pyinstaller
- name: Ensure Inno Setup 6
shell: powershell
run: |
if (Get-Command iscc.exe -ErrorAction SilentlyContinue) {
iscc.exe /? | Out-Null
Write-Host "Inno Setup compiler found in PATH."
} elseif (Test-Path "C:\Program Files (x86)\Inno Setup 6\ISCC.exe") {
"C:\Program Files (x86)\Inno Setup 6" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /? | Out-Null
Write-Host "Inno Setup compiler found in Program Files (x86)."
} elseif (Test-Path "C:\Program Files\Inno Setup 6\ISCC.exe") {
"C:\Program Files\Inno Setup 6" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
& "C:\Program Files\Inno Setup 6\ISCC.exe" /? | Out-Null
Write-Host "Inno Setup compiler found in Program Files."
} else {
throw "Inno Setup 6 is not installed on runner. Install Inno Setup and restart runner service."
}
- name: Extract app version
id: extract_version
shell: powershell
@@ -95,15 +113,19 @@ jobs:
run: |
python build.py
- name: Ensure archive exists
- name: Ensure artifacts exist
if: env.CONTINUE == 'true'
shell: powershell
run: |
$version = "${{ steps.extract_version.outputs.version }}"
$archivePath = "dist/AnabasisManager-$version.zip"
$installerPath = "dist/AnabasisManager-setup-$version.exe"
if (-not (Test-Path $archivePath)) {
throw "Archive not found: $archivePath"
}
if (-not (Test-Path $installerPath)) {
throw "Installer not found: $installerPath"
}
- name: Generate SHA256 checksum
if: env.CONTINUE == 'true'
@@ -111,11 +133,14 @@ jobs:
run: |
$version = "${{ steps.extract_version.outputs.version }}"
$archiveName = "AnabasisManager-$version.zip"
$archivePath = "dist/$archiveName"
$checksumPath = "dist/$archiveName.sha256"
$hash = (Get-FileHash -Path $archivePath -Algorithm SHA256).Hash.ToLower()
"$hash $archiveName" | Set-Content -Path $checksumPath -Encoding UTF8
Write-Host "Checksum created: $checksumPath"
$installerName = "AnabasisManager-setup-$version.exe"
foreach ($name in @($archiveName, $installerName)) {
$path = "dist/$name"
$checksumPath = "dist/$name.sha256"
$hash = (Get-FileHash -Path $path -Algorithm SHA256).Hash.ToLower()
"$hash $name" | Set-Content -Path $checksumPath -Encoding UTF8
Write-Host "Checksum created: $checksumPath"
}
- name: Configure git identity
if: env.CONTINUE == 'true'
@@ -152,3 +177,5 @@ jobs:
files: |
dist/AnabasisManager-${{ steps.extract_version.outputs.version }}.zip
dist/AnabasisManager-${{ steps.extract_version.outputs.version }}.zip.sha256
dist/AnabasisManager-setup-${{ steps.extract_version.outputs.version }}.exe
dist/AnabasisManager-setup-${{ steps.extract_version.outputs.version }}.exe.sha256