Skip to content

Commit ff0870d

Browse files
committed
fix: fixed windows builder worflow
1 parent 4397add commit ff0870d

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ jobs:
5252
sudo apt-get update
5353
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev
5454
55+
- name: Install NSIS (Windows)
56+
if: runner.os == 'Windows'
57+
# Guarantees the NSIS compiler is available for Wails
58+
run: choco install nsis -y
59+
5560
- name: Install Wails CLI
5661
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
5762

@@ -62,16 +67,21 @@ jobs:
6267
- name: Package Mac App (Preserve Permissions)
6368
if: runner.os == 'macOS'
6469
working-directory: ./desktop/build/bin
65-
# Changed to lowercase
6670
run: zip -qr lansync-${{ matrix.artifact_name }}.zip LanSync.app
6771

6872
- name: Package Windows Installer
6973
if: runner.os == 'Windows'
7074
working-directory: ./desktop/build/bin
71-
# Deletes the raw executable and renames the actual NSIS installer
75+
# Smart PowerShell script to gracefully find, rename, and clean up
7276
run: |
73-
Remove-Item -Path "LanSync.exe" -ErrorAction SilentlyContinue
74-
Rename-Item -Path "*-installer.exe" -NewName "lansync-setup.exe"
77+
$installer = Get-ChildItem -Filter "*-installer.exe"
78+
if ($installer) {
79+
Rename-Item -Path $installer.FullName -NewName "lansync-setup.exe" -Force
80+
Remove-Item -Path "LanSync.exe" -ErrorAction SilentlyContinue
81+
} else {
82+
Write-Host "NSIS Installer not found. Using raw executable instead."
83+
Rename-Item -Path "LanSync.exe" -NewName "lansync-setup.exe" -Force
84+
}
7585
7686
- name: Upload Desktop Artifacts
7787
uses: actions/upload-artifact@v4
@@ -127,7 +137,7 @@ jobs:
127137

128138
- name: Prepare Assets for Release
129139
run: |
130-
# Linux binaries still need to be tarballed to preserve permissions. Changed to lowercase.
140+
# Linux binaries still need to be tarballed to preserve permissions
131141
cd artifacts/linux-amd64 && tar -czvf ../../lansync-linux-amd64.tar.gz . && cd ../../
132142
133143
- name: Create GitHub Release

0 commit comments

Comments
 (0)