Skip to content

Commit df32077

Browse files
committed
Automate Windows installer releases
1 parent b7d1bfc commit df32077

8 files changed

Lines changed: 280 additions & 35 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313

1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v6
16+
uses: actions/checkout@v4
1717

1818
- name: Setup .NET
19-
uses: actions/setup-dotnet@v5
19+
uses: actions/setup-dotnet@v4
2020
with:
2121
dotnet-version: 8.0.x
2222

@@ -26,12 +26,19 @@ jobs:
2626
- name: Build
2727
run: dotnet build ToastDesk.csproj --configuration Release --no-restore
2828

29-
- name: Publish Windows x64 package
29+
- name: Install packaging tools
30+
shell: pwsh
31+
run: |
32+
dotnet tool install --global wix
33+
"$env:USERPROFILE\.dotnet\tools" >> $env:GITHUB_PATH
34+
choco install innosetup --yes --no-progress
35+
36+
- name: Build distributable assets
3037
shell: pwsh
3138
run: ./scripts/publish-release.ps1
3239

33-
- name: Upload release package
40+
- name: Upload distributable assets
3441
uses: actions/upload-artifact@v4
3542
with:
36-
name: ToastDesk-win-x64
37-
path: artifacts/release/ToastDesk-win-x64.zip
43+
name: ToastDesk-windows-assets
44+
path: artifacts/release/ToastDesk-*

.github/workflows/release.yml

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
tags:
66
- "v*.*.*"
77
workflow_dispatch:
8+
inputs:
9+
tag_name:
10+
description: "Existing tag to release, for example v0.1.0"
11+
required: true
12+
type: string
813

914
permissions:
1015
contents: write
@@ -14,20 +19,41 @@ jobs:
1419
runs-on: windows-latest
1520

1621
steps:
22+
- name: Resolve release tag
23+
id: release_tag
24+
shell: pwsh
25+
run: |
26+
if ("${{ github.event_name }}" -eq "workflow_dispatch") {
27+
"tag=${{ inputs.tag_name }}" >> $env:GITHUB_OUTPUT
28+
} else {
29+
"tag=${{ github.ref_name }}" >> $env:GITHUB_OUTPUT
30+
}
31+
1732
- name: Checkout
18-
uses: actions/checkout@v6
33+
uses: actions/checkout@v4
34+
with:
35+
ref: ${{ steps.release_tag.outputs.tag }}
1936

2037
- name: Setup .NET
21-
uses: actions/setup-dotnet@v5
38+
uses: actions/setup-dotnet@v4
2239
with:
2340
dotnet-version: 8.0.x
2441

25-
- name: Publish Windows x64 package
42+
- name: Install packaging tools
43+
shell: pwsh
44+
run: |
45+
dotnet tool install --global wix
46+
"$env:USERPROFILE\.dotnet\tools" >> $env:GITHUB_PATH
47+
choco install innosetup --yes --no-progress
48+
49+
- name: Build release assets
2650
shell: pwsh
27-
run: ./scripts/publish-release.ps1
51+
run: ./scripts/publish-release.ps1 -ProductVersion "${{ steps.release_tag.outputs.tag }}"
2852

2953
- name: Create GitHub release
3054
uses: softprops/action-gh-release@v2
3155
with:
32-
files: artifacts/release/ToastDesk-win-x64.zip
56+
tag_name: ${{ steps.release_tag.outputs.tag }}
57+
name: ToastDesk ${{ steps.release_tag.outputs.tag }}
58+
files: artifacts/release/ToastDesk-*
3359
generate_release_notes: true

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
- For unpackaged WPF desktop notifications, register an AppUserModelID Start Menu shortcut before sending Windows toasts.
2727
- Prefer polling `UserNotificationListener.GetNotificationsAsync` for this prototype; subscribing to `NotificationChanged` can fail in this unpackaged desktop process.
2828
- The app should eventually ship as an easy Windows installable artifact, preferably `.exe` and/or `.msi`.
29+
- Release automation should publish public Windows assets from version tags: setup `.exe`, MSI, portable ZIP, and SHA256 checksums.
2930

3031
## Windows Behavior Requirements
3132

README.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
# ToastDesk
22

3-
Persistent Windows notifications you cannot miss.
3+
Windows notifications that stay visible until you act.
44

55
ToastDesk is a Windows 11 desktop app that mirrors Windows notifications into persistent, always-on-top toast cards. It keeps important alerts visible until you open or dismiss them.
66

77
![ToastDesk icon](assets/icons/ToastDesk.png)
88

99
## Download
1010

11-
Download the latest Windows build from:
11+
Download the latest Windows installer:
1212

13-
[ToastDesk Releases](https://github.com/nakorncode/toastdeck/releases/latest)
13+
- [ToastDesk-Setup-win-x64.exe](https://github.com/nakorncode/toastdeck/releases/latest/download/ToastDesk-Setup-win-x64.exe) - recommended installer
14+
- [ToastDesk-Setup-win-x64.msi](https://github.com/nakorncode/toastdeck/releases/latest/download/ToastDesk-Setup-win-x64.msi) - MSI package for Windows deployment
15+
- [ToastDesk-Portable-win-x64.zip](https://github.com/nakorncode/toastdeck/releases/latest/download/ToastDesk-Portable-win-x64.zip) - portable self-contained build
16+
- [SHA256 checksums](https://github.com/nakorncode/toastdeck/releases/latest/download/ToastDesk-SHA256SUMS.txt)
1417

15-
Use `ToastDesk-win-x64.zip`, extract it, then run `ToastDesk.exe`.
18+
All release builds are self-contained. No separate .NET runtime install is required.
1619

17-
ToastDesk is currently distributed as a self-contained Windows x64 ZIP package. No separate .NET runtime install is required.
20+
If Windows SmartScreen warns about an unknown publisher, choose **More info** then **Run anyway**. Code signing is planned after the app identity and installer flow stabilize.
1821

1922
## Status
2023

21-
ToastDesk is early public-preview software. Core notification capture, persistent overlay cards, tray behavior, settings, startup registration, notification actions, and notification sounds are implemented. Installer/signing work is still in progress.
24+
ToastDesk is early public-preview software. Core notification capture, persistent overlay cards, tray behavior, settings, startup registration, notification actions, notification sounds, and automated Windows release packaging are implemented. Code signing is still in progress.
2225

2326
## Features
2427

@@ -42,15 +45,20 @@ git tag v0.1.0
4245
git push origin v0.1.0
4346
```
4447

45-
The GitHub Actions release workflow will build `ToastDesk-win-x64.zip` and attach it to the release.
48+
The GitHub Actions release workflow builds and uploads:
49+
50+
- `ToastDesk-Setup-win-x64.exe`
51+
- `ToastDesk-Setup-win-x64.msi`
52+
- `ToastDesk-Portable-win-x64.zip`
53+
- `ToastDesk-SHA256SUMS.txt`
4654

4755
You can also create the package locally:
4856

4957
```powershell
5058
powershell -ExecutionPolicy Bypass -File .\scripts\publish-release.ps1
5159
```
5260

53-
The local package is written to `artifacts/release/ToastDesk-win-x64.zip`.
61+
The local packages are written to `artifacts/release`.
5462

5563
## Requirements
5664

@@ -70,19 +78,22 @@ powershell -ExecutionPolicy Bypass -File .\scripts\run-dev.ps1
7078
powershell -ExecutionPolicy Bypass -File .\scripts\run-build.ps1
7179
```
7280

73-
## Publish Release Package Locally
81+
## Publish Release Assets Locally
7482

7583
```powershell
7684
powershell -ExecutionPolicy Bypass -File .\scripts\publish-release.ps1
7785
```
7886

79-
The release package is written to `artifacts/release/ToastDesk-win-x64.zip`.
87+
The release assets are written to `artifacts/release`.
8088

8189
## Installer
8290

83-
An Inno Setup script is provided at `installer/ToastDesk.iss`. It expects the published app under `artifacts/publish/win-x64`.
91+
Release packaging creates both an Inno Setup `.exe` installer and a WiX `.msi` installer.
92+
93+
Local installer builds require:
8494

85-
MSI packaging is not finalized yet. The current public-ready package target is a signed or unsigned Windows x64 ZIP/EXE package.
95+
- [Inno Setup 6](https://jrsoftware.org/isinfo.php)
96+
- WiX CLI: `dotnet tool install --global wix`
8697

8798
## Notification Sounds
8899

docs/production-readiness.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
- Toast cards now use explicit `Open` and `Dismiss` actions. `Open` attempts to launch the source app by AppUserModelID when Windows exposes one, with ToastDesk as fallback.
1515
- Notification capture prefers Windows change events when available. If WinRT event subscription fails in the unpackaged desktop app, ToastDesk falls back to guarded 500ms polling to keep latency low without overlapping capture calls.
1616
- Improve settings: durable migration, clear defaults, restore defaults, notification sound presets/custom audio, and direct links to Windows notification permissions.
17-
- Prepare packaging: self-contained `.exe`, installer path, icon, versioning, and uninstall cleanup.
17+
- Prepare packaging: portable ZIP, setup `.exe`, MSI, icon, versioning, and uninstall cleanup.
1818
- Add diagnostics: local logs for notification permission, shortcut registration, startup registration, and capture polling failures.
1919

2020
## Current Public Repo Assets
2121

2222
- `README.md`, `LICENSE`, `SECURITY.md`, and `CONTRIBUTING.md`
2323
- GitHub Actions CI and release workflows
24-
- `scripts/publish-release.ps1` for Windows x64 self-contained release ZIPs
25-
- `installer/ToastDesk.iss` for an optional Inno Setup installer
24+
- `scripts/publish-release.ps1` for Windows x64 release ZIP, setup `.exe`, MSI, and checksums
25+
- `installer/ToastDesk.iss` for the Inno Setup installer
2626
- `assets/icons/ToastDesk.png` and `assets/icons/ToastDesk.ico`

docs/release-template.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33
## Download
44

5-
Download `ToastDesk-win-x64.zip` from this release, extract it, then run `ToastDesk.exe`.
5+
- `ToastDesk-Setup-win-x64.exe` - recommended installer
6+
- `ToastDesk-Setup-win-x64.msi` - MSI package for Windows deployment
7+
- `ToastDesk-Portable-win-x64.zip` - portable self-contained build
8+
- `ToastDesk-SHA256SUMS.txt` - SHA256 checksums
69

710
## Notes
811

912
- Windows 11 is the primary target.
10-
- The package is self-contained; no separate .NET runtime install is required.
13+
- Release builds are self-contained; no separate .NET runtime install is required.
1114
- Windows notification capture requires user permission.
12-
- This build is unsigned. Windows SmartScreen may warn on first launch until signing is added.
15+
- Release installers are unsigned. Windows SmartScreen may warn on first launch until signing is added.
1316

1417
## Changes
1518

installer/ToastDesk.iss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#define MyAppName "ToastDesk"
2+
#ifndef MyAppVersion
23
#define MyAppVersion "0.1.0"
4+
#endif
35
#define MyAppPublisher "NakornCode"
46
#define MyAppExeName "ToastDesk.exe"
57

@@ -12,7 +14,7 @@ DefaultDirName={autopf}\{#MyAppName}
1214
DefaultGroupName={#MyAppName}
1315
DisableProgramGroupPage=yes
1416
OutputDir=..\artifacts\installer
15-
OutputBaseFilename=ToastDesk-Setup-{#MyAppVersion}
17+
OutputBaseFilename=ToastDesk-Setup-{#MyAppVersion}-win-x64
1618
Compression=lzma
1719
SolidCompression=yes
1820
WizardStyle=modern

0 commit comments

Comments
 (0)