Skip to content

docs: change repo url #46

docs: change repo url

docs: change repo url #46

Workflow file for this run

name: Windows build (test)
# On-demand Windows builds for testing — no release required. Trigger it from the
# Actions tab ("Run workflow"), or by pushing a commit whose message contains
# "windows". Download the "keyparty-windows" artifact, unzip, and run
# KeyParty.exe — a single self-contained file (the frontend is embedded and the
# WebView2 loader is static-linked, so there's no DLL or assets folder).
on:
workflow_dispatch:
push:
permissions:
contents: read
# One build per ref; newer pushes cancel the older in-flight build.
concurrency:
group: windows-build-${{ github.ref }}
cancel-in-progress: true
jobs:
windows:
# Skip on pushes unless the commit asks for it — keeps this slow Windows build
# off routine pushes. Manual "Run workflow" always runs (no head_commit, so the
# first clause matches). GitHub can't filter pushes by commit message at the
# trigger level, hence the job-level gate; contains() is case-insensitive, so
# "Windows"/"WINDOWS" match too.
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, 'windows') }}
runs-on: windows-latest
env:
# Where the WebView2 SDK headers land (NuGet, version stripped).
NUGET_DIR: packages/Microsoft.Web.WebView2
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: 24
- uses: mlugg/setup-zig@v2
with:
version: 0.16.0
# Sets the MSVC environment (INCLUDE, WindowsSdkDir, WindowsSdkVersion, …)
# so Zig's msvc target finds the toolchain and the winrt headers (wrl.h).
- uses: ilammy/msvc-dev-cmd@v1
- name: Install dependencies (zero-native framework + CLI)
shell: bash
run: |
npm install
echo "$GITHUB_WORKSPACE/node_modules/.bin" >> "$GITHUB_PATH"
- name: Fetch the WebView2 SDK headers + loader
shell: bash
run: nuget install Microsoft.Web.WebView2 -OutputDirectory packages -ExcludeVersion
- name: Build the single-file Windows exe
shell: bash
run: |
WV2_INC="$GITHUB_WORKSPACE/$NUGET_DIR/build/native/include"
WV2_LIB="$GITHUB_WORKSPACE/$NUGET_DIR/build/native/x64"
echo "WebView2 include: $WV2_INC"
echo "WebView2 lib: $WV2_LIB"
# Fail loudly if the SDK pieces are missing: without WebView2.h the host
# silently compiles to a blank-window stub; without the static loader lib
# it can't link a self-contained exe.
test -f "$WV2_INC/WebView2.h" || { echo "ERROR: WebView2.h not found at $WV2_INC"; ls -R "$GITHUB_WORKSPACE/$NUGET_DIR" 2>/dev/null | head -40; exit 1; }
test -f "$WV2_LIB/WebView2LoaderStatic.lib" || { echo "ERROR: WebView2LoaderStatic.lib not found at $WV2_LIB"; exit 1; }
# The frontend is embedded into the exe (served from memory) and the
# WebView2 loader is static-linked, so the result is a single
# self-contained keyparty.exe. cl.exe (the host compiler) finds the
# Windows SDK + winrt (wrl.h) via %INCLUDE%.
zig build \
-Dtarget=x86_64-windows-msvc \
-Doptimize=ReleaseFast \
-Dwebview2-include="$WV2_INC" \
-Dwebview2-lib-dir="$WV2_LIB"
test -f zig-out/bin/keyparty.exe || { echo "ERROR: no exe produced"; ls -R zig-out; exit 1; }
# Ship the artifact under the user-facing name (matches the release asset).
cp zig-out/bin/keyparty.exe KeyParty.exe
ls -lh KeyParty.exe
- name: Upload the Windows build
uses: actions/upload-artifact@v4
with:
name: keyparty-windows
path: KeyParty.exe
if-no-files-found: error