windows-installer.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. name: Windows Installer
  2. # Build the Windows installer .exe.
  3. #
  4. # Triggers:
  5. # - Tag push matching v* (release builds, uploaded as a release asset)
  6. # - Manual dispatch (for testing the build pipeline)
  7. #
  8. # The installer is unsigned until SignPath OSS approval lands. Once it
  9. # does, add the SignPath GitHub Action between the ISCC step and the
  10. # upload step.
  11. on:
  12. push:
  13. tags:
  14. - 'v*'
  15. workflow_dispatch:
  16. # Least-privilege per CodeQL actions/missing-workflow-permissions.
  17. # contents: write is required by softprops/action-gh-release to attach
  18. # the .exe to a tag release; the manual-dispatch path doesn't trigger
  19. # that step and could run with read-only, but a single workflow-level
  20. # block keeps the surface auditable in one place.
  21. permissions:
  22. contents: write
  23. jobs:
  24. build:
  25. runs-on: windows-latest
  26. timeout-minutes: 30
  27. steps:
  28. - name: Checkout
  29. uses: actions/checkout@v4
  30. - name: Setup Python
  31. uses: actions/setup-python@v5
  32. with:
  33. python-version: '3.13'
  34. - name: Setup Node.js
  35. uses: actions/setup-node@v4
  36. with:
  37. node-version: '22'
  38. # Inno Setup 6.x is pre-installed on windows-latest runners (under
  39. # C:\Program Files (x86)\Inno Setup 6\). No install step needed.
  40. - name: Stage installer artifacts
  41. working-directory: installers/windows
  42. run: python build.py
  43. shell: pwsh
  44. - name: Compile installer (ISCC)
  45. working-directory: installers/windows
  46. run: |
  47. & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" bambuddy.iss
  48. shell: pwsh
  49. - name: Upload installer artifact
  50. uses: actions/upload-artifact@v4
  51. with:
  52. name: bambuddy-windows-installer
  53. path: installers/windows/build/output/*.exe
  54. if-no-files-found: error
  55. - name: Attach installer to release
  56. if: startsWith(github.ref, 'refs/tags/v')
  57. uses: softprops/action-gh-release@v2
  58. with:
  59. files: installers/windows/build/output/*.exe
  60. fail_on_unmatched_files: true