Skip to content

Commit ea4dc0b

Browse files
Publish installer (#9)
* Publish installer * update * update * update * update * update * update * update
1 parent 21cb4fb commit ea4dc0b

File tree

3 files changed

+82
-1
lines changed

3 files changed

+82
-1
lines changed

.github/actions/full-build/action.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ runs:
1515
steps:
1616
- uses: actions/setup-dotnet@v4
1717

18+
- name: Install WiX v6
19+
shell: bash
20+
run: |
21+
dotnet tool install --global wix --version 6.0.*
22+
1823
- name: Build
1924
shell: bash
2025
run: dotnet build
@@ -38,8 +43,16 @@ runs:
3843
Compress-Archive -Path "publish/$arch/*" -DestinationPath "publish/SentryReplay-${{ inputs.version }}-$arch.zip"
3944
}
4045
46+
- name: Create MSI Installers
47+
shell: bash
48+
run: |
49+
for arch in ${{ inputs.archs }}; do
50+
wix build Package.wxs -arch $arch -d Version=${{ inputs.version }} -d Arch=$arch -o "publish/SentryReplay-${{ inputs.version }}-$arch.msi"
51+
done
52+
4153
- uses: actions/upload-artifact@v4
4254
with:
4355
if-no-files-found: error
4456
path: |
4557
publish/*.zip
58+
publish/*.msi

.github/workflows/deploy.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ jobs:
3333
GH_TOKEN: ${{ github.token }}
3434
with:
3535
tag: "v${{ github.event.inputs.version }}"
36-
artifacts: "publish/*.zip"
36+
artifacts: |
37+
publish/*.zip
38+
publish/*.msi
3739
generateReleaseNotes: true
3840
prerelease: ${{ contains(github.event.inputs.version, 'preview') }}
3941
allowUpdates: ${{ github.event.inputs.updateRelease }}

Package.wxs

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2+
<Package Name="Sentry Replay"
3+
Manufacturer="Daniel Chalmers"
4+
Version="$(var.Version)"
5+
UpgradeCode="98E07D4B-45EB-45A6-90A5-2A68E772F2E7"
6+
Scope="perUser">
7+
<Property Id="ARPNOMODIFY" Value="1" />
8+
<MajorUpgrade AllowSameVersionUpgrades="yes"
9+
DowngradeErrorMessage="A newer version of Sentry Replay is already installed." />
10+
<MediaTemplate EmbedCab="yes" />
11+
12+
<CustomAction Id="LaunchApp"
13+
Directory="INSTALLFOLDER"
14+
ExeCommand="&quot;[INSTALLFOLDER]SentryReplay.exe&quot;"
15+
Execute="immediate"
16+
Impersonate="yes"
17+
Return="asyncNoWait" />
18+
19+
<InstallExecuteSequence>
20+
<Custom Action="LaunchApp" After="InstallFinalize" Condition="NOT Installed" />
21+
</InstallExecuteSequence>
22+
23+
<Feature Id="Main" Title="SentryReplay" Level="1">
24+
<ComponentGroupRef Id="ProductComponents" />
25+
</Feature>
26+
</Package>
27+
28+
<Fragment>
29+
<StandardDirectory Id="LocalAppDataFolder">
30+
<Directory Id="SentryReplayRoot" Name="SentryReplay">
31+
<Directory Id="INSTALLFOLDER" Name="SentryReplay" />
32+
</Directory>
33+
</StandardDirectory>
34+
<StandardDirectory Id="ProgramMenuFolder">
35+
<Directory Id="ProgramMenuSentryReplay" Name="Sentry Replay" />
36+
</StandardDirectory>
37+
</Fragment>
38+
39+
<Fragment>
40+
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
41+
<Component Id="MainExecutable" Guid="*">
42+
<File Id="SentryReplayExe" Source="publish/$(var.Arch)/SentryReplay.exe" KeyPath="yes" />
43+
<RemoveFile Id="RemoveOldFiles" Name="*.*" On="both" />
44+
<RemoveFolder Id="RemoveInstallFolder" Directory="INSTALLFOLDER" On="uninstall" />
45+
</Component>
46+
<Component Id="StartMenuShortcut" Guid="*">
47+
<Shortcut Id="SentryReplayShortcut"
48+
Name="Sentry Replay"
49+
Description="Sentry Replay"
50+
Directory="ProgramMenuSentryReplay"
51+
Target="[INSTALLFOLDER]SentryReplay.exe"
52+
WorkingDirectory="INSTALLFOLDER" />
53+
<RemoveFolder Id="RemoveStartMenuFolder" Directory="ProgramMenuSentryReplay" On="uninstall" />
54+
<RegistryValue Root="HKCU"
55+
Key="Software\\Daniel Chalmers\\SentryReplay"
56+
Name="StartMenuShortcut"
57+
Type="integer"
58+
Value="1"
59+
KeyPath="yes" />
60+
</Component>
61+
<Files Include="publish/$(var.Arch)/**">
62+
<Exclude Files="publish/$(var.Arch)/SentryReplay.exe" />
63+
</Files>
64+
</ComponentGroup>
65+
</Fragment>
66+
</Wix>

0 commit comments

Comments
 (0)