The previous job ran setup.{sh,bat} on the runner which downloaded Node.js +
3.4 GB of OpenClaw deps (clawdbot, @sliverp, node-llama-cpp), pushing the
Windows zip past GitHub's 2 GB single-file limit.
The portable folder is designed to fetch deps on first launch via setup.sh —
ship just the source skeleton (~1 MB) and let the user-side script populate
app/runtime + app/core/node_modules from China mirrors at first launch.
This also collapses portable-windows + portable-mac into one ubuntu-runner
job since the skeleton is platform-agnostic.
162 lines
4.9 KiB
YAML
162 lines
4.9 KiB
YAML
name: Release
|
||
|
||
on:
|
||
push:
|
||
tags:
|
||
- 'v*'
|
||
workflow_dispatch:
|
||
inputs:
|
||
tag:
|
||
description: 'Tag to publish (e.g. v2.1.0). Leave empty to use the most recent tag.'
|
||
required: false
|
||
default: ''
|
||
|
||
permissions:
|
||
contents: write
|
||
|
||
jobs:
|
||
portable-skeleton:
|
||
name: Portable skeleton zip (cross-platform)
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
|
||
- name: Stage portable skeleton (no node_modules, no Node.js runtime)
|
||
run: |
|
||
mkdir -p dist
|
||
tag_name="${GITHUB_REF_NAME:-${{ github.event.inputs.tag }}}"
|
||
stage_dir="dist/u-claw-portable-${tag_name}"
|
||
mkdir -p "$stage_dir"
|
||
# Copy source skeleton only — first launch will download Node.js + OpenClaw
|
||
# via portable/setup.sh / setup.bat (China mirror, ~1 minute).
|
||
cp -R portable/. "$stage_dir/"
|
||
rm -rf "$stage_dir/app" "$stage_dir/data/logs" 2>/dev/null || true
|
||
|
||
- name: Zip skeleton
|
||
run: |
|
||
tag_name="${GITHUB_REF_NAME:-${{ github.event.inputs.tag }}}"
|
||
cd dist
|
||
zip -qry "u-claw-portable-${tag_name}.zip" "u-claw-portable-${tag_name}"
|
||
ls -lh "u-claw-portable-${tag_name}.zip"
|
||
|
||
- uses: actions/upload-artifact@v4
|
||
with:
|
||
name: portable-skeleton
|
||
path: dist/u-claw-portable-*.zip
|
||
|
||
desktop-windows:
|
||
name: Electron Windows installer
|
||
runs-on: windows-latest
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
|
||
- uses: actions/setup-node@v4
|
||
with:
|
||
node-version: '22'
|
||
|
||
- name: Install dependencies
|
||
shell: cmd
|
||
run: |
|
||
cd u-claw-app
|
||
npm install --registry=https://registry.npmmirror.com
|
||
|
||
- name: Build Windows installer
|
||
shell: cmd
|
||
run: |
|
||
cd u-claw-app
|
||
npm run build:win
|
||
env:
|
||
# Skip code signing — we ship unsigned. README documents the SmartScreen workaround.
|
||
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
|
||
|
||
- uses: actions/upload-artifact@v4
|
||
with:
|
||
name: desktop-windows
|
||
path: |
|
||
u-claw-app/release/*.exe
|
||
u-claw-app/release/*.exe.blockmap
|
||
|
||
desktop-mac:
|
||
name: Electron macOS DMG
|
||
runs-on: macos-14
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
|
||
- uses: actions/setup-node@v4
|
||
with:
|
||
node-version: '22'
|
||
|
||
- name: Install dependencies
|
||
run: |
|
||
cd u-claw-app
|
||
npm install --registry=https://registry.npmmirror.com
|
||
|
||
- name: Build macOS DMG
|
||
run: |
|
||
cd u-claw-app
|
||
npm run build:mac-arm64
|
||
env:
|
||
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
|
||
|
||
- uses: actions/upload-artifact@v4
|
||
with:
|
||
name: desktop-mac
|
||
path: |
|
||
u-claw-app/release/*.dmg
|
||
u-claw-app/release/*.dmg.blockmap
|
||
|
||
publish:
|
||
name: Publish GitHub Release
|
||
needs: [portable-skeleton, desktop-windows, desktop-mac]
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
|
||
- uses: actions/download-artifact@v4
|
||
with:
|
||
path: artifacts
|
||
|
||
- name: Resolve tag
|
||
id: tag
|
||
run: |
|
||
if [ -n "${{ github.event.inputs.tag }}" ]; then
|
||
tag="${{ github.event.inputs.tag }}"
|
||
else
|
||
tag="${GITHUB_REF_NAME}"
|
||
fi
|
||
echo "tag=$tag" >> "$GITHUB_OUTPUT"
|
||
|
||
- name: Read OpenClaw version
|
||
id: openclaw_version
|
||
run: |
|
||
version=$(tr -d '[:space:]' < OPENCLAW_VERSION)
|
||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||
|
||
- name: Create or update release
|
||
uses: softprops/action-gh-release@v2
|
||
with:
|
||
tag_name: ${{ steps.tag.outputs.tag }}
|
||
name: U-Claw ${{ steps.tag.outputs.tag }}
|
||
body: |
|
||
## U-Claw ${{ steps.tag.outputs.tag }}
|
||
|
||
- 内置虾盘云:首次启动自动绑定本机/U盘指纹,生成 `sk-uc-...` apiKey
|
||
- OpenClaw runtime: `${{ steps.openclaw_version.outputs.version }}`
|
||
- 充值入口:https://u-claw.org/cloud.html
|
||
|
||
### 下载
|
||
|
||
- **Windows 桌面版**:`U-Claw.Setup.*.exe`(安装到电脑)或 `U-Claw.*.exe`(免安装绿色版)
|
||
- **macOS 桌面版**:`U-Claw-*-arm64.dmg`(Apple Silicon)或 `U-Claw-*.dmg`(Intel)
|
||
- **便携骨架(U 盘版)**:`u-claw-portable-*.zip`(约 1 MB,首次启动自动下载 Node.js + OpenClaw,国内镜像约 1 分钟)
|
||
|
||
> Windows 安装包未做代码签名,首次运行 SmartScreen 选择「仍要运行」。
|
||
> macOS DMG 未做公证,首次启动 `xattr -rd com.apple.quarantine /Applications/U-Claw.app` 或右键打开。
|
||
files: |
|
||
artifacts/portable-skeleton/*
|
||
artifacts/desktop-windows/*
|
||
artifacts/desktop-mac/*
|
||
fail_on_unmatched_files: false
|
||
env:
|
||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|