Skip to content

Commit 0ac53ad

Browse files
author
Mohammed Abdelgadir A. Hassan
committed
clean release
1 parent d5b83d0 commit 0ac53ad

2 files changed

Lines changed: 56 additions & 2 deletions

File tree

.github/workflows/dotnet-desktop.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,25 @@ jobs:
8080
/p:PublishSingleFile=true `
8181
/p:EnableCompressionInSingleFile=true
8282
83+
- name: Install WiX Toolset
84+
if: startsWith(github.ref, 'refs/tags/v')
85+
run: |
86+
dotnet tool install --global wix --version 5.0.2
87+
88+
- name: Build MSI Installer
89+
if: startsWith(github.ref, 'refs/tags/v')
90+
run: |
91+
wix build scanneragent/installer.wxs `
92+
-d PublishDir=${{ github.workspace }}\publish\win-x64 `
93+
-out ./publish/win-x64/scanneragent-win-x64.msi `
94+
-arch x64
95+
8396
- name: Create release package
8497
if: startsWith(github.ref, 'refs/tags/v')
8598
run: |
8699
Write-Host "Files in release package:"
87-
Get-ChildItem -Path ./publish/win-x64 -Include scanneragent.exe,appsettings.json | Format-Table Name, Length
88-
Compress-Archive -Path ./publish/win-x64/scanneragent.exe,./publish/win-x64/appsettings.json -DestinationPath ./scanneragent-win-x64.zip
100+
Get-ChildItem -Path ./publish/win-x64 -Include scanneragent.exe,appsettings.json,scanneragent-win-x64.msi | Format-Table Name, Length
101+
Compress-Archive -Path ./publish/win-x64/scanneragent.exe,./publish/win-x64/appsettings.json,./publish/win-x64/scanneragent-win-x64.msi -DestinationPath ./scanneragent-win-x64.zip
89102
90103
- name: Upload artifacts
91104
uses: actions/upload-artifact@v4

scanneragent/installer.wxs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3+
<Product Id="*"
4+
Name="Scanner Agent"
5+
Language="1033"
6+
Version="1.0.0.0"
7+
Manufacturer="Your Company Name"
8+
UpgradeCode="12345678-1234-1234-1234-123456789012">
9+
10+
<Package InstallerVersion="200"
11+
Compressed="yes"
12+
InstallScope="perMachine"
13+
Platform="x64" />
14+
15+
<MajorUpgrade DowngradeErrorMessage="A newer version of Scanner Agent is already installed." />
16+
<MediaTemplate EmbedCab="yes" />
17+
18+
<Feature Id="ProductFeature" Title="Scanner Agent" Level="1">
19+
<ComponentGroupRef Id="ProductComponents" />
20+
</Feature>
21+
22+
<Directory Id="TARGETDIR" Name="SourceDir">
23+
<Directory Id="ProgramFiles64Folder">
24+
<Directory Id="INSTALLFOLDER" Name="ScannerAgent" />
25+
</Directory>
26+
<Directory Id="ProgramMenuFolder">
27+
<Directory Id="ApplicationProgramsFolder" Name="Scanner Agent"/>
28+
</Directory>
29+
</Directory>
30+
31+
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
32+
<Component Id="ScannerAgentExe" Guid="*" Win64="yes">
33+
<File Id="ScannerAgentExe" Source="$(var.PublishDir)\scanneragent.exe" KeyPath="yes" />
34+
</Component>
35+
<Component Id="AppSettings" Guid="*" Win64="yes">
36+
<File Id="AppSettingsJson" Source="$(var.PublishDir)\appsettings.json" />
37+
</Component>
38+
</ComponentGroup>
39+
40+
</Product>
41+
</Wix>

0 commit comments

Comments
 (0)