Add Windows release workflow

This commit is contained in:
Alvin-Zilverstand committed 2026-09-10 14:26:50 +02:00
1 parent 6048e15996
commit 532ab0234f
4 files changed
+109 -1

No files matched your search

+94
View File
@@ -0,0 +1,94 @@
name: Build Windows Release
on:
push:
branches:
- master
- main
tags:
- "v*"
pull_request:
branches:
- master
- main
workflow_dispatch:
permissions:
contents: write
concurrency:
group: build-windows-release-${{ github.ref }}
cancel-in-progress: true
jobs:
windows-installer:
name: Windows installer
runs-on: windows-latest
defaults:
run:
shell: pwsh
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 11.19.0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
src-tauri
- name: Install Windows bundler dependencies
run: |
choco install nsis wixtoolset -y --no-progress
if (Test-Path "C:\Program Files (x86)\NSIS") {
Add-Content $env:GITHUB_PATH "C:\Program Files (x86)\NSIS"
}
if (Test-Path "C:\Program Files (x86)\WiX Toolset v3.14\bin") {
Add-Content $env:GITHUB_PATH "C:\Program Files (x86)\WiX Toolset v3.14\bin"
}
if (Test-Path "C:\Program Files (x86)\WiX Toolset v3.11\bin") {
Add-Content $env:GITHUB_PATH "C:\Program Files (x86)\WiX Toolset v3.11\bin"
}
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
- name: Run Rust tests
run: cargo test
- name: Build Windows desktop installers
run: pnpm run desktop:build
- name: Upload installer artifacts
uses: actions/upload-artifact@v4
with:
name: clipforge-windows-installers
if-no-files-found: error
path: |
src-tauri/target/release/bundle/msi/*.msi
src-tauri/target/release/bundle/nsis/*.exe
- name: Publish GitHub release assets
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: |
src-tauri/target/release/bundle/msi/*.msi
src-tauri/target/release/bundle/nsis/*.exe
+6
View File
@@ -44,3 +44,9 @@ The verified build outputs are:
- `src-tauri/target/release/bundle/msi/ClipForge_0.1.0_x64_en-US.msi`
- `src-tauri/target/release/bundle/nsis/ClipForge_0.1.0_x64-setup.exe`
The NSIS setup EXE installs for the current Windows user by default and creates the normal Windows uninstaller entry/file during installation. The MSI can also be removed through Windows Apps/Programs and Features.
## GitHub Releases
GitHub Actions builds Windows installer artifacts on pushes to `master`/`main`, pull requests, and manual runs. Any pushed file change, including newly added files, triggers a build. Pushing a tag like `v0.1.0` also publishes the MSI and setup EXE to a GitHub Release.
+1
View File
@@ -2,6 +2,7 @@
"name": "clipforge",
"version": "0.1.0",
"private": true,
"packageManager": "pnpm@11.19.0",
"type": "module",
"description": "Windows-first local game clipping app with replay buffer and event auto-clipping.",
"scripts": {
+8 -1
View File
@@ -28,7 +28,14 @@
"active": true,
"targets": ["msi", "nsis"],
"externalBin": ["binaries/ffmpeg"],
"icon": ["icons/icon.ico"]
"icon": ["icons/icon.ico"],
"windows": {
"nsis": {
"installMode": "currentUser",
"installerIcon": "icons/icon.ico",
"uninstallerIcon": "icons/icon.ico"
}
}
}
}