Skip to content

Commit

Permalink
fix typo on input, set gh token and add wixtoolset
Browse files Browse the repository at this point in the history
  • Loading branch information
ale7714 committed Jan 15, 2025
1 parent 443a02f commit fb03448
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/build-msi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ jobs:
- name: Check for existing version
shell: bash
run: |
if gh release view | grep "agent-${{ github.event.inputs.version }}.msi"; then
echo "Error: An artifact with version '${{ github.event.inputs.version }}' already exists. Please increment the version."
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
Expand All @@ -40,6 +42,7 @@ jobs:
- name: Install WiX 5.0
run: |
dotnet tool install --global wix
dotnet nuget add source https://nuget.pkg.github.com/wixtoolset/index.json -n wixtoolset
dotnet tool install --global WixToolset.Util
dotnet tool install --global WixToolset.Firewall
Expand All @@ -50,13 +53,13 @@ jobs:
run: |
wix build agent.wxs \
--define GoBinDir="${{ github.workspace }}" \
--define MSIProductVersion="${{ github.event.inputs.version }}" \
--define MSIProductVersion="${{ github.event.inputs.msi_version }}" \
--ext WixToolset.Util.wixext \
--ext WixToolset.Firewall.wixext \
-o agent-${{ github.event.inputs.version }}.msi
-o agent-${{ github.event.inputs.msi_version }}.msi
- name: Upload MSI artifact
uses: actions/upload-artifact@v3
with:
name: agent-${{ github.event.inputs.version }}.msi
path: agent-${{ github.event.inputs.version }}.msi
name: agent-${{ github.event.inputs.msi_version }}.msi
path: agent-${{ github.event.inputs.msi_version }}.msi

0 comments on commit fb03448

Please sign in to comment.