Skip to content

Commit 4a37165

Browse files
committed
feat: build and upload a per-user Windows installer artifact via GitHub Actions.
1 parent 6a62ee7 commit 4a37165

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- os: windows-latest
1414
platform: windows/amd64
1515
name: mergen_windows_amd64.exe
16-
args: ""
16+
args: "-nsis"
1717
- os: ubuntu-22.04
1818
platform: linux/amd64
1919
name: mergen_linux_amd64
@@ -64,6 +64,8 @@ jobs:
6464
if [ "${{ matrix.os }}" == "windows-latest" ]; then
6565
# Move the built binary directly
6666
mv build/bin/mergen.exe ${{ matrix.name }}
67+
# Move the installer
68+
mv build/bin/mergen-amd64-installer.exe mergen_installer_windows_amd64.exe
6769
elif [ "${{ matrix.os }}" == "ubuntu-22.04" ]; then
6870
mv build/bin/mergen ${{ matrix.name }}
6971
else
@@ -78,6 +80,7 @@ jobs:
7880
# Calculate checksum for the artifact
7981
if [ "${{ matrix.os }}" == "windows-latest" ]; then
8082
certutil -hashfile ${{ matrix.name }} SHA256 | grep -v "hash" | head -n 1 > ${{ matrix.name }}.sha256
83+
certutil -hashfile mergen_installer_windows_amd64.exe SHA256 | grep -v "hash" | head -n 1 > mergen_installer_windows_amd64.exe.sha256
8184
else
8285
shasum -a 256 ${{ matrix.name }} > ${{ matrix.name }}.sha256
8386
fi
@@ -86,7 +89,11 @@ jobs:
8689
uses: actions/upload-artifact@v4
8790
with:
8891
name: ${{ matrix.name }}
89-
path: ${{ matrix.name }}
92+
path: |
93+
${{ matrix.name }}
94+
${{ matrix.name }}.sha256
95+
mergen_installer_windows_amd64.exe
96+
mergen_installer_windows_amd64.exe.sha256
9097
9198
release:
9299
needs: build

build/windows/installer/project.nsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Unicode true
2828
## !define PRODUCT_EXECUTABLE "Application.exe" # Default "${INFO_PROJECTNAME}.exe"
2929
## !define UNINST_KEY_NAME "UninstKeyInRegistry" # Default "${INFO_COMPANYNAME}${INFO_PRODUCTNAME}"
3030
####
31-
## !define REQUEST_EXECUTION_LEVEL "admin" # Default "admin" see also https://nsis.sourceforge.io/Docs/Chapter4.html
31+
!define REQUEST_EXECUTION_LEVEL "user" # Default "admin" see also https://nsis.sourceforge.io/Docs/Chapter4.html
3232
####
3333
## Include the wails tools
3434
####
@@ -72,7 +72,7 @@ ManifestDPIAware true
7272

7373
Name "${INFO_PRODUCTNAME}"
7474
OutFile "..\..\bin\${INFO_PROJECTNAME}-${ARCH}-installer.exe" # Name of the installer's file.
75-
InstallDir "$PROGRAMFILES64\${INFO_COMPANYNAME}\${INFO_PRODUCTNAME}" # Default installing folder ($PROGRAMFILES is Program Files folder).
75+
InstallDir "$LOCALAPPDATA\${INFO_COMPANYNAME}\${INFO_PRODUCTNAME}" # Default installing folder ($PROGRAMFILES is Program Files folder).
7676
ShowInstDetails show # This will always show the installation details.
7777

7878
Function .onInit

0 commit comments

Comments
 (0)