diff --git a/.github/workflows/msi.yml b/.github/workflows/msi.yml index a77c89b5..69a284f0 100644 --- a/.github/workflows/msi.yml +++ b/.github/workflows/msi.yml @@ -24,7 +24,7 @@ jobs: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} run: | $version = $env:GITHUB_REF.TrimStart("refs/tags/v") - ./build.ps1 -Architecture ${{ matrix.arch }} -Version $version -Sign + ./build.ps1 -Architecture ${{ matrix.arch }} -Version $version -Download -Sign - name: Upload artifacts 🆙 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea with: diff --git a/packages/msi/build.ps1 b/packages/msi/build.ps1 index 6a8b2872..c5d794f8 100644 --- a/packages/msi/build.ps1 +++ b/packages/msi/build.ps1 @@ -9,12 +9,8 @@ Param [parameter(Mandatory = $false)] [string] $SDKVersion = "10.0.22621.0", - [parameter(Mandatory = $false)] - [boolean] - $Download = $true, - [parameter(Mandatory = $false)] - [boolean] - $Sign = $false + [switch]$Download, + [switch]$Sign ) $PSDefaultParameterValues['Out-File:Encoding'] = 'UTF8' @@ -26,8 +22,8 @@ if ($Download) { # download the executable $file = "posh-windows-$Architecture.exe" $name = "oh-my-posh.exe" - $download = "https://github.com/jandedobbeleer/oh-my-posh/releases/download/v$Version/$($file)" - Invoke-WebRequest $download -Out "./dist/$($name)" + $url = "https://github.com/jandedobbeleer/oh-my-posh/releases/download/v$Version/$($file)" + Invoke-WebRequest $url -Out "./dist/$($name)" } # variables