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 toolcommand 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.msiGotchas
- WiX v4 and v5 use
wix build; the older v3 usedcandleandlightinstead. - Add WiX extensions you reference with
wix extension addbefore building.
Related guides
How to Sign a Windows Binary With signtool in GitHub ActionsCode-sign a Windows executable on a windows-latest runner in GitHub Actions with signtool, decoding a base64…
How to Upload a Windows Build Artifact in GitHub ActionsUpload a Windows build output such as an .exe or .msi from a windows-latest runner in GitHub Actions with act…