Skip to content

feat: finalize version 6.0.1.9 with user improvements #14

feat: finalize version 6.0.1.9 with user improvements

feat: finalize version 6.0.1.9 with user improvements #14

Workflow file for this run

name: QuickView Build & Release
on:
push:
tags:
- 'v*'
workflow_dispatch: # Allow manual trigger
jobs:
build-and-release:
name: Build & Pack (${{ matrix.platform }})
runs-on: windows-latest
permissions:
contents: write
strategy:
matrix:
include:
- platform: x64
preset: Release-LTO
- platform: ARM64
preset: ARM64-Release-LTO
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install LLVM/Clang
run: choco install llvm -y
- name: Restore vcpkg Cache
id: vcpkg-cache
uses: actions/cache@v4
with:
path: |
out/build/${{ matrix.preset }}/vcpkg_installed
${{ github.workspace }}/third_party/vcpkg/installed
${{ env.LOCALAPPDATA }}/vcpkg/archives
key: vcpkg-${{ matrix.platform }}-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-${{ matrix.platform }}-
- name: Bootstrap vcpkg
shell: pwsh
run: |
cd third_party/vcpkg
if (-not (Test-Path "vcpkg.exe")) {
./bootstrap-vcpkg.bat
}
- name: Configure CMake
run: cmake --preset ${{ matrix.preset }}
- name: Build Project
run: cmake --build --preset ${{ matrix.preset }}
- name: Prepare Portable Version
shell: pwsh
run: |
$archUpper = if ("${{ matrix.platform }}" -eq "x64") { "X64" } else { "ARM64" }
# Path for CMake build artifact (Ninja puts it in root)
$exePath = "${{ github.workspace }}/out/build/${{ matrix.preset }}/QuickView.exe"
if (-not (Test-Path $exePath)) { Write-Error "EXE not found at $exePath"; exit 1 }
# Extract version
$rawVersion = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($exePath).ProductVersion
$tag = if ($rawVersion -like "v*") { $rawVersion } else { "v$rawVersion" }
# Trim .0
if ($tag -match '^v\d+\.\d+\.\d+\.0$') {
$tag = $tag.Substring(0, $tag.LastIndexOf('.'))
}
echo "DETECTED_TAG=$tag" >> $env:GITHUB_ENV
# Prepare dist
New-Item -ItemType Directory -Force "Release/dist"
$zipName = "QuickView_${tag}_${archUpper}.zip"
Compress-Archive -Path $exePath -DestinationPath "Release/dist/$zipName" -Force
- name: Build Inno Setup Installer
shell: pwsh
run: |
$arch = "${{ matrix.platform }}".ToLower()
$archUpper = if ("${{ matrix.platform }}" -eq "x64") { "X64" } else { "ARM64" }
$tag = "${{ env.DETECTED_TAG }}"
$version = $tag.TrimStart('v')
# CRITICAL FIX: Use absolute path for ExePath to prevent Inno Setup relative path confusion
$absExePath = "${{ github.workspace }}/out/build/${{ matrix.preset }}/QuickView.exe"
$outputName = "QuickView_Installer_${tag}_${archUpper}"
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DMyAppVersion=$version /DAppArch=$arch /DOutputName=$outputName /DExePath="$absExePath" /O"Release\dist" installer\QuickView.iss
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: QuickView-Staging-${{ matrix.platform }}
path: Release/dist/*
publish-final:
needs: build-and-release
runs-on: windows-latest
name: Consolidate & Release
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
pattern: QuickView-Staging-*
path: final-dist
merge-multiple: true
- name: Upload Consolidated Artifact
uses: actions/upload-artifact@v4
with:
name: QuickView-Standard-Distribution
path: final-dist/*
- name: Upload to GitHub Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: final-dist/*
draft: true
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}