# Build Talkative.exe and TalkativeSetup.exe from the public source. # # - Manual run (Actions tab -> Build -> Run workflow): builds both and # keeps them as a downloadable workflow artifact. # - Pushing a tag like v1.3.6: same, then attaches both to a DRAFT GitHub # release. Drafts are invisible to /releases/latest, so the in-app # updater never offers one -- nothing reaches users until the draft is # reviewed and published by hand. # # Builds here (not on a dev machine) are what SignPath Foundation's free # open-source code signing requires: the signature vouches that the binary # came from this repository's source via this workflow. name: Build on: workflow_dispatch: push: tags: ["v*"] permissions: contents: write # only used to attach files to a draft release jobs: build: runs-on: windows-latest defaults: run: shell: pwsh steps: - uses: actions/checkout@v7 - uses: actions/setup-python@v7 with: # Pinned: 3.14.7 moved Tcl/Tk 9.0's library into a //zipfs: # virtual filesystem that PyInstaller 6.21 can't collect, so the # 1.3.6-1.3.8 EXEs shipped without Tcl data and crashed at launch # ("Tcl data directory ... _tcl_data not found"). 3.14.6 (Tcl/Tk # 8.6) is what the dev machine builds with. Don't bump without the # Tcl check below passing. python-version: "3.14.6" cache: pip cache-dependency-path: requirements-lock.txt - name: Check the version is the same everywhere # Shipping with the About tab on an old version happened twice # (v1.1.1, v1.1.2); a tag that disagrees with the source is the # same mistake. run: | $app = (Select-String -Path talkative\__init__.py -Pattern '__version__\s*=\s*"([^"]+)"').Matches[0].Groups[1].Value $iss = (Select-String -Path installer\Talkative.iss -Pattern '#define MyAppVersion "([^"]+)"').Matches[0].Groups[1].Value Write-Host "talkative/__init__.py: $app installer/Talkative.iss: $iss" if ($app -ne $iss) { throw "Version mismatch: __init__.py $app vs Talkative.iss $iss" } if ("${{ github.ref_type }}" -eq "tag" -and "${{ github.ref_name }}" -ne "v$app") { throw "Tag ${{ github.ref_name }} does not match version v$app" } "APP_VERSION=$app" >> $env:GITHUB_ENV - name: Install dependencies (pinned) run: python -m pip install -r requirements-lock.txt - name: Build Talkative.exe run: .\scripts\build_exe.ps1 -Python python - name: Check the EXE bundles Tcl/Tk data # Every window (settings, onboarding, toasts) needs it; without it # the EXE crashes at launch -- which the smoke test below missed for # three releases, because the crash dialog keeps the process alive. run: | $n = (python -m PyInstaller.utils.cliutils.archive_viewer -l dist\Talkative.exe | Select-String -Pattern "_tcl_data|_tk_data").Count Write-Host "Tcl/Tk data files in the EXE: $n" if ($n -lt 100) { throw "Talkative.exe has no Tcl/Tk data ($n files) -- it would crash at launch" } - name: Smoke test -- the EXE starts and stays up run: | $p = Start-Process dist\Talkative.exe -PassThru Start-Sleep -Seconds 15 $alive = Get-Process Talkative -ErrorAction SilentlyContinue if (-not $alive) { throw "Talkative.exe exited within 15s of launch (exit code $($p.ExitCode))" } # A startup crash leaves the process alive behind PyInstaller's # "Unhandled exception in script" dialog. $crashed = $alive | Where-Object { $_.MainWindowTitle -like "*exception*" } if ($crashed) { $alive | Stop-Process -Force; throw "Talkative.exe crashed at launch: '$($crashed.MainWindowTitle)'" } Write-Host "Running: PIDs $($alive.Id -join ', ')" $alive | Stop-Process -Force - name: Fetch the VC++ runtime the installer bundles run: | New-Item -ItemType Directory -Force installer\redist | Out-Null Invoke-WebRequest https://aka.ms/vs/17/release/vc_redist.x64.exe -OutFile installer\redist\vc_redist.x64.exe - name: Install Inno Setup # >= 6.7 for the Windows 11 wizard style; pinned (version and hash) so # Inno 7 can't change the installer unnoticed. From Inno's own GitHub # release, not Chocolatey: its feed was down for two runs on 2026-11-24. run: | $f = "$env:RUNNER_TEMP\innosetup-6.7.3.exe" Invoke-WebRequest https://github.com/jrsoftware/issrc/releases/download/is-6_7_3/innosetup-6.7.3.exe -OutFile $f $h = (Get-FileHash $f -Algorithm SHA256).Hash if ($h -ne "9C73C3BAE7ED48D44112A0F48E66742C00090BDB5BEF71D9D3C056C66E97B732") { throw "Inno Setup hash mismatch: $h" } Start-Process $f -ArgumentList "/VERYSILENT","/SUPPRESSMSGBOXES","/NORESTART","/SP-","/ALLUSERS","/DIR=`"${env:ProgramFiles(x86)}\Inno Setup 6`"" -Wait if (-not (Test-Path "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe")) { throw "Inno Setup did not install" } - name: Build TalkativeSetup.exe run: | & "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe" installer\Talkative.iss if ($LASTEXITCODE -ne 0) { throw "ISCC failed" } - name: Build the Microsoft Store package (unsigned; the Store signs it) # Identity values come from Partner Center (Product identity) and are # stored as repository variables, not secrets: they're printed in # every Store listing anyway. Until they're set, a placeholder # identity is used so the package still builds for checking. env: STORE_IDENTITY_NAME: ${{ vars.STORE_IDENTITY_NAME || 'SumitDas.Talkative.LocalTest' }} STORE_PUBLISHER: ${{ vars.STORE_PUBLISHER || 'CN=Talkative Local Test' }} STORE_DISPLAY_NAME: ${{ vars.STORE_DISPLAY_NAME || 'Talkative' }} run: | .\scripts\build_msix.ps1 -Python python -IdentityName $env:STORE_IDENTITY_NAME ` -Publisher $env:STORE_PUBLISHER -DisplayName $env:STORE_DISPLAY_NAME - name: Checksums run: | Get-FileHash dist\Talkative.exe, installer\Output\TalkativeSetup.exe -Algorithm SHA256 | ForEach-Object { "$($_.Hash.ToLower()) $(Split-Path $_.Path -Leaf)" } | Tee-Object -FilePath SHA256SUMS.txt - uses: actions/upload-artifact@v7 with: name: Talkative-${{ env.APP_VERSION }} path: | dist/Talkative.exe installer/Output/TalkativeSetup.exe SHA256SUMS.txt - uses: actions/upload-artifact@v7 with: name: Talkative-${{ env.APP_VERSION }}-store path: dist/Talkative-*.msix - name: Attach to a draft release (tag builds only) if: github.ref_type == 'tag' env: GH_TOKEN: ${{ github.token }} run: | gh release create "${{ github.ref_name }}" installer\Output\TalkativeSetup.exe SHA256SUMS.txt ` --draft --title "Talkative $env:APP_VERSION" ` --notes "Built by GitHub Actions from ${{ github.sha }}. Review, then publish."