Skip to content

Commit

Permalink
debugging wxi
Browse files Browse the repository at this point in the history
  • Loading branch information
ale7714 committed Jan 15, 2025
1 parent e6d0a4c commit 7a5ada6
Showing 1 changed file with 47 additions and 37 deletions.
84 changes: 47 additions & 37 deletions .github/workflows/build-msi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,57 +10,67 @@ on:

jobs:
build-msi:
runs-on: windows-2022
runs-on: windows-2019

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install GitHub CLI
run: |
choco install gh --yes
# - name: Install GitHub CLI
# run: |
# choco install gh --yes

# Step 3: Only needed while we provide manual versions
- name: Check for existing version
shell: bash
run: |
if gh release view | grep "agent-${{ github.event.inputs.msi_version }}.msi"; then
echo "Error: An artifact with version '${{ github.event.inputs.msi_version }}' already exists. Please increment the version."
exit 1
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# # Step 3: Only needed while we provide manual versions
# - name: Check for existing version
# shell: bash
# run: |
# if gh release view | grep "agent-${{ github.event.inputs.msi_version }}.msi"; then
# echo "Error: An artifact with version '${{ github.event.inputs.msi_version }}' already exists. Please increment the version."
# exit 1
# fi
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23.1'
# - 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 Make
# run: choco install make --yes

- name: Install WiX 5.0
- name: Add NuGet Feed
run: dotnet nuget add source https://nuget.pkg.github.com/wixtoolset/index.json -n wixtoolset

- name: Install WiX CLI
run: dotnet tool install --global wix


# debugging steps
- name: Search for WiX Extensions
run: |
dotnet nuget list source
wix extension list
- name: Install WiX Extensions
run: |
wix extension add -g WixToolset.Util
wix extension add -g WixToolset.Firewall
- name: Build Go binary
run: make windows
# - name: Build Go binary
# run: make windows

- name: Build MSI
run: |
wix build agent.wxs \
--define GoBinDir="${{ github.workspace }}" \
--define MSIProductVersion="${{ github.event.inputs.msi_version }}" \
--ext WixToolset.Util.wixext \
--ext WixToolset.Firewall.wixext \
-o agent-${{ github.event.inputs.msi_version }}.msi
# - name: Build MSI
# run: |
# wix build agent.wxs \
# --define GoBinDir="${{ github.workspace }}" \
# --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@v3
with:
name: agent-${{ github.event.inputs.msi_version }}.msi
path: agent-${{ github.event.inputs.msi_version }}.msi
# - name: Upload MSI artifact
# uses: actions/upload-artifact@v3
# with:
# name: agent-${{ github.event.inputs.msi_version }}.msi
# path: agent-${{ github.event.inputs.msi_version }}.msi

0 comments on commit 7a5ada6

Please sign in to comment.