Skip to content

Commit

Permalink
Refactor build command in windows-build.yml: Update pnpm version and …
Browse files Browse the repository at this point in the history
…NSIS installation
  • Loading branch information
minai621 committed Oct 18, 2024
1 parent e887acb commit 1a17007
Showing 1 changed file with 6 additions and 26 deletions.
32 changes: 6 additions & 26 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
runs-on: windows-latest
runs-on: windows-2019
strategy:
matrix:
node-version: [18.x]
Expand All @@ -23,37 +23,17 @@ jobs:

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9.4.0

- name: Check NSIS version before installation
run: |
$nsisPath = "C:\Program Files (x86)\NSIS\makensis.exe"
if (Test-Path $nsisPath) {
Write-Output "NSIS is already installed. Version:"
& $nsisPath /VERSION
} else {
Write-Output "NSIS is not installed."
}
shell: pwsh

- name: Install NSIS
run: |
$url = "https://netcologne.dl.sourceforge.net/project/nsis/NSIS%203/3.04/nsis-3.04.zip"
$output = "$env:TEMP\nsis-3.04.zip"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri $url -OutFile $output
Expand-Archive -Path $output -DestinationPath "C:\Program Files (x86)\NSIS" -Force
$env:PATH += ";C:\Program Files (x86)\NSIS"
echo "C:\Program Files (x86)\NSIS" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: pwsh

- name: Check NSIS version after installation
- name: Check NSIS version
run: |
$nsisPath = "C:\Program Files (x86)\NSIS\makensis.exe"
if (Test-Path $nsisPath) {
Write-Output "NSIS installed successfully. Version:"
Write-Output "NSIS version:"
& $nsisPath /VERSION
} else {
Write-Output "Failed to install NSIS."
Write-Output "NSIS not found in expected location."
exit 1
}
shell: pwsh
Expand Down

0 comments on commit 1a17007

Please sign in to comment.