From fa93af83cda81a81ba5aa9a922e58aa6ab7e7215 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Sun, 24 Nov 2024 08:56:02 +0100 Subject: [PATCH] fix(msi): install wix in Action --- .github/workflows/msi.yml | 2 ++ packages/msi/build.ps1 | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/msi.yml b/.github/workflows/msi.yml index 69a284f0..3b3f073e 100644 --- a/.github/workflows/msi.yml +++ b/.github/workflows/msi.yml @@ -16,6 +16,8 @@ jobs: steps: - name: Checkout code 👋 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - name: Install Wix Toolset 🛠 + run: dotnet tool install --global wix - name: Build installer 📦 id: build env: diff --git a/packages/msi/build.ps1 b/packages/msi/build.ps1 index c5d794f8..f0bee419 100644 --- a/packages/msi/build.ps1 +++ b/packages/msi/build.ps1 @@ -20,9 +20,14 @@ New-Item -Path "." -Name "out" -ItemType Directory -ErrorAction SilentlyContinue if ($Download) { # download the executable - $file = "posh-windows-$Architecture.exe" + switch ($Architecture) { + 'x86' { $file = "posh-windows-386.exe" } + 'x64' { $file = "posh-windows-amd64.exe" } + Default { $file = "posh-windows-$Architecture.exe" } + } + $name = "oh-my-posh.exe" - $url = "https://github.com/jandedobbeleer/oh-my-posh/releases/download/v$Version/$($file)" + $url = "https://github.com/jandedobbeleer/oh-my-posh/releases/download/v$Version/$file" Invoke-WebRequest $url -Out "./dist/$($name)" }