diff --git a/.github/workflows/pr-windows-packaging.yml b/.github/workflows/pr-windows-packaging.yml new file mode 100644 index 0000000..787625a --- /dev/null +++ b/.github/workflows/pr-windows-packaging.yml @@ -0,0 +1,39 @@ +name: Windows Installer Packaging + + +on: + push: + paths: + - 'setup-lando.ps1' + pull_request: + paths: + - 'setup-lando.ps1' + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install PS2EXE + shell: powershell + run: Install-Module -Name ps2exe -Force -Scope CurrentUser + + - name: Convert PowerShell script to EXE + shell: powershell + run: | + $scriptPath = "${{ github.workspace }}/setup-lando.ps1" + $outputPath = "${{ github.workspace }}/setup-lando.exe" + Invoke-ps2exe -inputFile $scriptPath -outputFile $outputPath -supportOS + + - name: Upload EXE as artifact + uses: actions/upload-artifact@v4 + id: artifact-upload-step + with: + name: setup-lando-exe + path: ${{ github.workspace }}/setup-lando.exe + + - name: Output artifact URL + run: echo 'Artifact URL is ${{ steps.artifact-upload-step.outputs.artifact-url }}' \ No newline at end of file diff --git a/setup-lando.ps1 b/setup-lando.ps1 index 8f062a0..816aa3e 100755 --- a/setup-lando.ps1 +++ b/setup-lando.ps1 @@ -47,7 +47,7 @@ param( ) $LANDO_DEFAULT_MV = "3" -$LANDO_SETUP_PS1_URL = "https://get.lando.dev/setup-lando.ps1" +$LANDO_SETUP_PS1_URL = "https://raw.githubusercontent.com/lando/setup-lando/setup-windoze/setup-lando.ps1" $LANDO_SETUP_SH_URL = "https://get.lando.dev/setup-lando.sh" $LANDO_APPDATA = "$env:LOCALAPPDATA\Lando"