Repository navigation
Release 0.1.2 Windows-proven build #3
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: Windows Release | |
| on: | |
| push: | |
| tags: ["v*"] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Test | |
| run: python -m unittest discover -s tests -v | |
| - name: Build portable executable | |
| run: | | |
| python -m pip install --upgrade pip pyinstaller | |
| pyinstaller --noconfirm --clean --windowed --onefile --name FolderCompare foldercompare/__main__.py | |
| - name: Windows core end-to-end test | |
| run: python scripts/windows_core_e2e.py | |
| - name: Build portable ZIP | |
| shell: pwsh | |
| run: | | |
| $tag = "${{ github.ref_name }}" | |
| Compress-Archive -Path dist/FolderCompare.exe -DestinationPath "FolderCompare-$tag-windows-x64-portable.zip" | |
| - name: Install Inno Setup | |
| shell: pwsh | |
| run: choco install innosetup --no-progress -y | |
| - name: Build installer | |
| shell: pwsh | |
| run: | | |
| $tag = "${{ github.ref_name }}" | |
| $version = $tag.TrimStart('v') | |
| & "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe" "/DMyAppVersion=$version" packaging\foldercompare.iss | |
| Move-Item release\FolderCompare-setup.exe "FolderCompare-$tag-windows-x64-setup.exe" | |
| - name: Installed and portable Windows app test | |
| shell: pwsh | |
| run: ./scripts/windows_app_e2e.ps1 -PortableExe "dist\FolderCompare.exe" -InstallerExe "FolderCompare-${{ github.ref_name }}-windows-x64-setup.exe" | |
| - name: Checksums | |
| shell: pwsh | |
| run: | | |
| Get-FileHash FolderCompare-*-windows-x64-portable.zip -Algorithm SHA256 | ForEach-Object { "$($_.Hash.ToLower()) $(Split-Path $_.Path -Leaf)" } | Set-Content SHA256SUMS.txt | |
| Get-FileHash FolderCompare-*-windows-x64-setup.exe -Algorithm SHA256 | ForEach-Object { "$($_.Hash.ToLower()) $(Split-Path $_.Path -Leaf)" } | Add-Content SHA256SUMS.txt | |
| - name: Publish GitHub release | |
| shell: pwsh | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| $assets = @( | |
| (Get-ChildItem 'FolderCompare-*-windows-x64-portable.zip').FullName | |
| (Get-ChildItem 'FolderCompare-*-windows-x64-setup.exe').FullName | |
| (Resolve-Path 'SHA256SUMS.txt').Path | |
| ) | |
| gh release create "${{ github.ref_name }}" @assets --generate-notes --title "${{ github.ref_name }}" |