ci: add manual windows packaging workflow (#460)

This commit is contained in:
Felix
2026-03-13 11:02:45 +08:00
committed by GitHub
Unverified
parent 02c8e7534b
commit 5e880221b2

View File

@@ -0,0 +1,66 @@
name: Package Windows (Manual)
on:
workflow_dispatch:
inputs:
ref:
description: 'Git ref to build (branch, tag, or SHA). Leave empty for current default ref.'
required: false
default: ''
permissions:
contents: read
jobs:
package-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '24'
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Download uv binaries for Windows
run: pnpm run uv:download:win
- name: Build Windows package (no publish)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm run build:vite && pnpm exec zx scripts/bundle-openclaw.mjs && pnpm exec electron-builder --win --publish never
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: windows-package
path: |
release/*.exe
release/*.blockmap
release/*.yml
!release/builder-debug.yml
retention-days: 7