From 5e880221b2abc8bcd6ec04d5cf95a73c7e463428 Mon Sep 17 00:00:00 2001 From: Felix <24791380+vcfgv@users.noreply.github.com> Date: Fri, 13 Mar 2026 11:02:45 +0800 Subject: [PATCH] ci: add manual windows packaging workflow (#460) --- .github/workflows/package-win-manual.yml | 66 ++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/package-win-manual.yml diff --git a/.github/workflows/package-win-manual.yml b/.github/workflows/package-win-manual.yml new file mode 100644 index 000000000..d3954881a --- /dev/null +++ b/.github/workflows/package-win-manual.yml @@ -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