Skip to content

Build MSI

Build MSI #29

Workflow file for this run

name: Build MSI
on:
workflow_dispatch:
inputs:
# since this is being triggered manually on branch but we should use our regular git tags when we're back on the normal flow
msi_version:
description: "MSI package version (e.g., 1.0.0)"
required: true
jobs:
build-msi:
runs-on: windows-2019
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23.1'
- name: Install Make
run: choco install make --yes
- name: Install WiX CLI
run: dotnet tool install --global wix
- name: Install WiX Extensions
run: |
wix extension add -g WixToolset.Firewall.wixext/5.0.2
wix extension add -g WixToolset.Util.wixext/5.0.2
- name: Build Go binary
run: make windows
- name: Build MSI
run: |
wix build agent.wxs -define GoBinDir="${{ github.workspace }}\bin" -define MSIProductVersion="${{ github.event.inputs.msi_version }}" -ext WixToolset.Util.wixext -ext WixToolset.Firewall.wixext -o agent-${{ github.event.inputs.msi_version }}.msi
- name: Upload MSI artifact
uses: actions/upload-artifact@v4
with:
name: agent-${{ github.event.inputs.msi_version }}.msi
path: agent-${{ github.event.inputs.msi_version }}.msi