Skip to content

Build Windows executable #90

Build Windows executable

Build Windows executable #90

Workflow file for this run

# Builds EchoQuill.exe and EchoQuill-Setup.exe on GitHub's free Windows
# servers, automatically, whenever you publish a release (or run it manually
# from the Actions tab). The finished files are attached to the release.
name: Build Windows executable
on:
push:
tags: ["v*"]
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt pyinstaller pyflakes
- name: Verify UI wiring (no undefined button handlers)
run: python scripts/check_wiring.py
- name: Generate icon
run: python scripts/gen_icon.py
- name: Guard - no undefined names / broken wiring
run: |
python scripts/check_undefined.py
python scripts/check_wiring.py
- name: Build EchoQuill (folder build - fewer antivirus false positives)
run: >
pyinstaller --noconsole --name EchoQuill --icon icon.ico
--collect-all faster_whisper
--collect-all ctranslate2
--collect-all pystray
--hidden-import pyperclip
--hidden-import keyboard
--collect-all tkinterdnd2
--collect-all yt_dlp
--collect-all soundcard
--hidden-import soundcard
--collect-all docx
--hidden-import pypdf
--hidden-import qrcode
--hidden-import PIL.ImageTk
--collect-all imageio_ffmpeg
--hidden-import imageio_ffmpeg
--collect-all keyring
--hidden-import keyring.backends.Windows
--hidden-import win32ctypes.core
--hidden-import win32ctypes.core.ctypes
run.py
- name: Package portable zip
run: Compress-Archive -Path dist/EchoQuill -DestinationPath EchoQuill-portable-win64.zip
# Code signing - activates automatically once the four AZURE_* secrets
# exist in repo Settings → Secrets. Until then this step is skipped.
- name: Sign EchoQuill.exe (Azure Trusted Signing)
if: ${{ vars.SIGNING_ENABLED == 'true' }}
uses: azure/trusted-signing-action@v0
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
endpoint: ${{ secrets.AZURE_SIGNING_ENDPOINT }}
trusted-signing-account-name: ${{ secrets.AZURE_SIGNING_ACCOUNT }}
certificate-profile-name: ${{ secrets.AZURE_CERT_PROFILE }}
files-folder: dist/EchoQuill
files-folder-filter: exe
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Build installer (Inno Setup)
run: |
choco install innosetup --no-progress -y
& "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe" installer.iss
- name: Upload artifacts (manual runs)
uses: actions/upload-artifact@v4
with:
name: EchoQuill-windows
path: |
EchoQuill-portable-win64.zip
Output/EchoQuill-Setup.exe
- name: Sign the installer too
if: ${{ vars.SIGNING_ENABLED == 'true' }}
uses: azure/trusted-signing-action@v0
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
endpoint: ${{ secrets.AZURE_SIGNING_ENDPOINT }}
trusted-signing-account-name: ${{ secrets.AZURE_SIGNING_ACCOUNT }}
certificate-profile-name: ${{ secrets.AZURE_CERT_PROFILE }}
files-folder: Output
files-folder-filter: exe
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Create release with downloads
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'release'
uses: softprops/action-gh-release@v2
with:
name: EchoQuill ${{ github.ref_name }}
generate_release_notes: true
files: |
EchoQuill-portable-win64.zip
Output/EchoQuill-Setup.exe