chore: update developer name in appdata #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Release Windows Executable | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' # Triggers on version tags like v1.0.0, v2.1.3, etc. | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: '6.8' | |
| host: 'windows' | |
| target: 'desktop' | |
| arch: 'win64_msvc2022_64' | |
| cache: true | |
| - name: Setup MSVC | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| - name: Build Application | |
| shell: cmd | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=%Qt6_DIR% | |
| nmake | |
| - name: Prepare Release Directory | |
| shell: powershell | |
| run: | | |
| New-Item -ItemType Directory -Force -Path release | |
| Copy-Item "build\colorsmith.exe" -Destination "release\ColorSmith.exe" | |
| - name: Deploy Qt Dependencies | |
| shell: cmd | |
| run: | | |
| cd release | |
| windeployqt --release ColorSmith.exe | |
| - name: Copy Additional Resources | |
| shell: powershell | |
| run: | | |
| # Copy resources if they exist | |
| if (Test-Path "resources") { | |
| # Copy standard-html-colors.json if it exists | |
| if (Test-Path "resources\standard-html-colors.json") { | |
| New-Item -ItemType Directory -Force -Path "release\resources" | |
| Copy-Item "resources\standard-html-colors.json" -Destination "release\resources\" -Force | |
| } | |
| } | |
| # Copy README and LICENSE if they exist | |
| if (Test-Path "README.md") { | |
| Copy-Item "README.md" -Destination "release\" | |
| } | |
| if (Test-Path "LICENSE") { | |
| Copy-Item "LICENSE" -Destination "release\" | |
| } | |
| - name: Install Inno Setup | |
| shell: powershell | |
| run: | | |
| # Install Inno Setup using Chocolatey (pre-installed on GitHub Actions runners) | |
| choco install innosetup --no-progress -y | |
| # Find Inno Setup installation path dynamically | |
| $possiblePaths = @( | |
| "C:\Program Files (x86)\Inno Setup 6", | |
| "C:\Program Files\Inno Setup 6", | |
| "C:\Program Files (x86)\Inno Setup 5", | |
| "C:\Program Files\Inno Setup 5" | |
| ) | |
| $innoPath = $null | |
| foreach ($path in $possiblePaths) { | |
| if (Test-Path "$path\ISCC.exe") { | |
| $innoPath = $path | |
| break | |
| } | |
| } | |
| if ($innoPath) { | |
| Write-Host "Inno Setup installed successfully at: $innoPath" | |
| # Add to PATH | |
| echo $innoPath | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| # Store for next step | |
| echo "INNO_PATH=$innoPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| } else { | |
| Write-Error "Inno Setup installation failed - ISCC.exe not found in any expected location" | |
| exit 1 | |
| } | |
| - name: Create Installer with Inno Setup | |
| shell: powershell | |
| run: | | |
| # Create Inno Setup script | |
| @" | |
| [Setup] | |
| AppName=ColorSmith | |
| AppVersion=${{ github.ref_name }} | |
| AppPublisher=KTechPit | |
| DefaultDirName={autopf}\ColorSmith | |
| DefaultGroupName=ColorSmith | |
| OutputDir=. | |
| OutputBaseFilename=ColorSmith-Setup-${{ github.ref_name }}-Win64 | |
| Compression=lzma2 | |
| SolidCompression=yes | |
| ArchitecturesAllowed=x64 | |
| ArchitecturesInstallIn64BitMode=x64 | |
| WizardStyle=modern | |
| UninstallDisplayIcon={app}\ColorSmith.exe | |
| [Files] | |
| Source: "release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs | |
| [Icons] | |
| Name: "{group}\ColorSmith"; Filename: "{app}\ColorSmith.exe" | |
| Name: "{autodesktop}\ColorSmith"; Filename: "{app}\ColorSmith.exe"; Tasks: desktopicon | |
| [Tasks] | |
| Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; | |
| [Run] | |
| Filename: "{app}\ColorSmith.exe"; Description: "{cm:LaunchProgram,ColorSmith}"; Flags: nowait postinstall skipifsilent | |
| "@ | Out-File -FilePath "installer.iss" -Encoding ASCII | |
| # Compile installer using ISCC with fallback | |
| $ErrorActionPreference = 'Stop' | |
| try { | |
| # Try using ISCC from PATH first | |
| & iscc "installer.iss" | |
| if ($LASTEXITCODE -ne 0) { | |
| throw "ISCC exited with code $LASTEXITCODE" | |
| } | |
| } catch { | |
| Write-Host "PATH method failed, trying direct path..." | |
| # Fallback to direct path if PATH doesn't work | |
| if ($env:INNO_PATH) { | |
| & "$env:INNO_PATH\ISCC.exe" "installer.iss" | |
| if ($LASTEXITCODE -ne 0) { | |
| throw "ISCC exited with code $LASTEXITCODE" | |
| } | |
| } else { | |
| throw "Could not find ISCC.exe" | |
| } | |
| } | |
| # Verify the installer was created | |
| if (Test-Path "ColorSmith-Setup-${{ github.ref_name }}-Win64.exe") { | |
| Write-Host "Installer created successfully" | |
| $fileSize = (Get-Item "ColorSmith-Setup-${{ github.ref_name }}-Win64.exe").Length / 1MB | |
| Write-Host "Installer size: $([math]::Round($fileSize, 2)) MB" | |
| } else { | |
| Write-Error "Installer creation failed - output file not found" | |
| exit 1 | |
| } | |
| - name: Create Portable ZIP | |
| shell: powershell | |
| run: | | |
| Compress-Archive -Path "release\*" -DestinationPath "ColorSmith-Portable-${{ github.ref_name }}-Win64.zip" | |
| - name: Generate Checksums | |
| shell: powershell | |
| run: | | |
| $installer = Get-FileHash "ColorSmith-Setup-${{ github.ref_name }}-Win64.exe" -Algorithm SHA256 | |
| $portable = Get-FileHash "ColorSmith-Portable-${{ github.ref_name }}-Win64.zip" -Algorithm SHA256 | |
| @" | |
| # Checksums (SHA256) | |
| ## Installer | |
| File: ColorSmith-Setup-${{ github.ref_name }}-Win64.exe | |
| SHA256: $($installer.Hash) | |
| ## Portable | |
| File: ColorSmith-Portable-${{ github.ref_name }}-Win64.zip | |
| SHA256: $($portable.Hash) | |
| "@ | Out-File -FilePath "checksums.txt" -Encoding UTF8 | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| ColorSmith-Setup-${{ github.ref_name }}-Win64.exe | |
| ColorSmith-Portable-${{ github.ref_name }}-Win64.zip | |
| checksums.txt | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true | |
| body: | | |
| ## ColorSmith ${{ github.ref_name }} | |
| A modern, elegant color picker application built with Qt for Windows. | |
| ### Downloads | |
| - **Installer**: `ColorSmith-Setup-${{ github.ref_name }}-Win64.exe` - Recommended for most users | |
| - **Portable**: `ColorSmith-Portable-${{ github.ref_name }}-Win64.zip` - No installation required, extract and run | |
| ### System Requirements | |
| - Windows 10/11 (64-bit) | |
| - 2 GB RAM minimum | |
| - 100 MB free disk space | |
| ### Installation | |
| **Installer**: Run the .exe file and follow the installation wizard. | |
| **Portable**: Extract the .zip file to any folder and run ColorSmith.exe. | |
| ### Checksums | |
| Please verify the integrity of your download using the checksums provided in `checksums.txt`. | |
| --- | |
| For issues or feature requests, please visit the [Issues](https://github.com/${{ github.repository }}/issues) page. | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload Build Artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: windows-build | |
| path: | | |
| ColorSmith-Setup-${{ github.ref_name }}-Win64.exe | |
| ColorSmith-Portable-${{ github.ref_name }}-Win64.zip | |
| checksums.txt | |
| retention-days: 30 | |