Skip to content
Latchkey

How to Build an MSI Installer With WiX in GitHub Actions

Install the WiX dotnet tool, then wix build compiles your .wxs authoring into an installable MSI.

WiX v4+ ships as a .NET global tool. Install it with dotnet tool install --global wix, then run wix build against your .wxs files to emit the MSI.

Steps

  • Set up .NET so the dotnet tool command is available.
  • Install WiX with dotnet tool install --global wix.
  • Run wix build Product.wxs -o dist/app.msi.

Workflow

.github/workflows/release.yml
jobs:
  installer:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-dotnet@v4
        with:
          dotnet-version: '8.0.x'
      - run: dotnet tool install --global wix
      - run: wix build installer/Product.wxs -o dist/app.msi
      - uses: actions/upload-artifact@v4
        with:
          name: msi
          path: dist/app.msi

Gotchas

  • WiX v4 and v5 use wix build; the older v3 used candle and light instead.
  • Add WiX extensions you reference with wix extension add before building.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →