release: v1.0.15 — QQBot 死锁修复、离线安装包、musl 架构支持

This commit is contained in:
10000ge10000
2026-03-13 00:20:08 +08:00
parent a99283aee2
commit 3aa39512c0
18 changed files with 1870 additions and 170 deletions

View File

@@ -2,15 +2,10 @@ name: Build Node.js ARM64 musl
on:
workflow_dispatch:
inputs:
node_version:
description: 'Node.js 版本 (如 22.16.0)'
required: true
default: '22.16.0'
jobs:
build:
name: Build Node.js ${{ github.event.inputs.node_version }} ARM64 musl
name: Build Node.js ARM64 musl
runs-on: ubuntu-latest
permissions:
contents: write
@@ -19,6 +14,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Extract Node.js version from source
id: node_ver
run: |
NODE_VER=$(grep -oP 'NODE_VERSION="\$\{NODE_VERSION:-\K[0-9.]+' root/usr/bin/openclaw-env)
echo "version=${NODE_VER}" >> "$GITHUB_OUTPUT"
echo "Node.js version from openclaw-env: v${NODE_VER}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
@@ -26,7 +28,7 @@ jobs:
- name: Build Node.js ARM64 musl portable
run: |
NODE_VER="${{ github.event.inputs.node_version }}"
NODE_VER="${{ steps.node_ver.outputs.version }}"
mkdir -p dist
echo "=== Building Node.js v${NODE_VER} ARM64 musl portable tarball ==="
docker run --rm --platform linux/arm64 \
@@ -64,7 +66,7 @@ jobs:
Node.js 官方 [unofficial-builds](https://unofficial-builds.nodejs.org/) 仅提供 x64 musl 构建,不提供 ARM64 musl。
此 Release 使用 Alpine Linux ARM64 (musl libc) 环境打包。
**注意**: 实际 Node.js 版本可能与文件名中的版本略有差异(取决于 Alpine 仓库提供的版本
但主版本号 (v22.x) 保证兼容
**注意**: 文件名中的版本号为 Alpine `apk add nodejs` 实际安装的版本,
构建时自动从 `openclaw-env` 读取
`openclaw-env setup` 会在 ARM64 musl 设备上自动从此处下载。

View File

@@ -4,14 +4,24 @@ on:
workflow_dispatch:
inputs:
version:
description: '版本号 (留空自动生成,格式: 1.0.0)'
description: '版本号 (留空则读取 VERSION 文件)'
required: false
default: ''
build_offline:
description: '是否构建离线安装包 (~130MB/架构)'
required: false
type: boolean
default: false
create_release:
description: '是否创建 Release'
required: false
type: boolean
default: true
upload_openlist:
description: '是否上传到 OpenList 网盘'
required: false
type: boolean
default: false
jobs:
build:
@@ -38,6 +48,17 @@ jobs:
echo "tag=v$VER" >> "$GITHUB_OUTPUT"
echo "Version: $VER"
- name: Extract build versions from source
id: build_versions
run: |
# 从 openclaw-env 中提取版本号 (唯一的版本真相源)
NODE_VER=$(grep -oP 'NODE_VERSION="\$\{NODE_VERSION:-\K[0-9.]+' root/usr/bin/openclaw-env)
OC_VER=$(grep -oP 'OC_TESTED_VERSION="\K[0-9.]+' root/usr/bin/openclaw-env)
echo "node_version=${NODE_VER}" >> "$GITHUB_OUTPUT"
echo "oc_version=${OC_VER}" >> "$GITHUB_OUTPUT"
echo "Node.js: v${NODE_VER}"
echo "OpenClaw: v${OC_VER}"
- name: Inject version
run: |
VER="${{ steps.version.outputs.version }}"
@@ -45,7 +66,9 @@ jobs:
# 同步到 Makefile
sed -i "s/^PKG_VERSION:=.*/PKG_VERSION:=$VER/" Makefile
- name: Build .run installer
# ── 在线安装包 (始终构建) ──
- name: Build .run installer (online)
run: |
chmod +x scripts/build_run.sh
sh scripts/build_run.sh dist
@@ -55,19 +78,50 @@ jobs:
chmod +x scripts/build_ipk.sh
sh scripts/build_ipk.sh dist
# ── 离线安装包 (可选) ──
- name: Setup Node.js (for offline build)
if: github.event.inputs.build_offline == 'true'
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Download offline dependencies
if: github.event.inputs.build_offline == 'true'
run: |
chmod +x scripts/download_deps.sh
sh scripts/download_deps.sh .offline-cache
env:
NODE_VERSION: ${{ steps.build_versions.outputs.node_version }}
OC_VERSION: ${{ steps.build_versions.outputs.oc_version }}
- name: Build offline .run (musl only)
if: github.event.inputs.build_offline == 'true'
run: |
chmod +x scripts/build_offline_run.sh
sh scripts/build_offline_run.sh dist/
env:
CACHE_DIR: .offline-cache
NODE_VERSION: ${{ steps.build_versions.outputs.node_version }}
# ── 通用步骤 ──
- name: List outputs
run: ls -lh dist/
run: |
echo "=== Build artifacts ==="
ls -lh dist/
echo ""
echo "=== SHA256 checksums ==="
sha256sum dist/*.run dist/*.ipk 2>/dev/null || true
- name: Extract changelog
id: changelog
run: |
VER="${{ steps.version.outputs.version }}"
# 提取当前版本的 CHANGELOG 内容 (从 ## [version] 到下一个 ## [ 之间)
CHANGELOG=$(awk "/^## \\[${VER}\\]/{found=1; next} /^## \\[/{if(found) exit} found{print}" CHANGELOG.md)
if [ -z "$CHANGELOG" ]; then
CHANGELOG="暂无更新日志"
fi
# 写入多行输出
{
echo "content<<CHANGELOG_EOF"
echo "$CHANGELOG"
@@ -79,56 +133,60 @@ jobs:
with:
name: luci-app-openclaw-${{ steps.version.outputs.version }}
path: dist/*
retention-days: 30
compression-level: 0
- name: Upload to OpenList (online)
if: github.event.inputs.upload_openlist == 'true'
run: |
chmod +x scripts/upload_openlist.sh
sh scripts/upload_openlist.sh dist/
env:
OPENLIST_URL: ${{ secrets.OPENLIST_URL }}
OPENLIST_USER: ${{ secrets.OPENLIST_USER }}
OPENLIST_PASS: ${{ secrets.OPENLIST_PASS }}
OPENLIST_PATH: ${{ secrets.OPENLIST_PATH }}
UPLOAD_MODE: online
- name: Upload to OpenList (offline)
if: github.event.inputs.upload_openlist == 'true' && github.event.inputs.build_offline == 'true'
run: |
sh scripts/upload_openlist.sh dist/
env:
OPENLIST_URL: ${{ secrets.OPENLIST_URL }}
OPENLIST_USER: ${{ secrets.OPENLIST_USER }}
OPENLIST_PASS: ${{ secrets.OPENLIST_PASS }}
OPENLIST_PATH: ${{ secrets.OPENLIST_PATH }}
UPLOAD_MODE: offline
- name: Create Release
if: ${{ github.event.inputs.create_release == 'true' }}
if: github.event.inputs.create_release == 'true'
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.tag }}
name: luci-app-openclaw ${{ steps.version.outputs.tag }}
name: ${{ steps.version.outputs.version }}
files: dist/*
draft: false
prerelease: false
body: |
## luci-app-openclaw ${{ steps.version.outputs.tag }}
OpenClaw AI 网关的 OpenWrt LuCI 管理插件。
### 更新日志
${{ steps.changelog.outputs.content }}
### 下载说明
---
| 文件 | 说明 |
|------|------|
| `luci-app-openclaw_*.run` | 自解压安装包,适用于已运行的 OpenWrt / iStoreOS 系统 |
| `luci-app-openclaw_*.ipk` | 标准 opkg 安装包 |
### 安装方法
**方式一:.run 安装包(推荐)**
```bash
# 上传到路由器后执行
sh luci-app-openclaw_${{ steps.version.outputs.version }}.run
**在线安装** (需联网,自动下载 Node.js + OpenClaw)
```
# iStoreOS
sh luci-app-openclaw_${{ steps.version.outputs.version }}.run
**方式二:.ipk 安装**
```bash
# OpenWrt
opkg install luci-app-openclaw_${{ steps.version.outputs.version }}-1_all.ipk
```
### 安装后使用
**离线安装** (无需联网,包含全部依赖)
```bash
# 将对应架构的 *_offline.run 传到路由器
scp luci-app-openclaw_*_offline.run root@路由器IP:/tmp/
ssh root@路由器IP "sh /tmp/luci-app-openclaw_*_offline.run"
```
1. 打开 LuCI → 服务 → OpenClaw
2. 点击「安装运行环境」,等待安装完成后服务会自动启动
3. 进入「Web 控制台」添加 AI 模型的 API Key 即可使用
### 兼容性
- 系统OpenWrt / iStoreOS / ImmortalWrt / KWRT 23.05+
- 架构x86_64、aarch64
- C 库glibc、musl自动识别
---
[使用文档](https://github.com/10000ge10000/luci-app-openclaw#readme) · [问题反馈](https://github.com/10000ge10000/luci-app-openclaw/issues) · [B站](https://space.bilibili.com/59438380) · [博客](https://blog.910501.xyz/)