Skip to content

Commit 0984f48

Browse files
authored
Merge pull request #90 from QVerisAI/fix/openclaw-qveris-plugin-dist
fix(packages): 发布 QVeris 插件编译产物
2 parents 230964e + c35afb9 commit 0984f48

3 files changed

Lines changed: 77 additions & 2 deletions

File tree

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Publish QVeris OpenClaw plugin to npm
2+
3+
on:
4+
push:
5+
tags:
6+
- "qveris-plugin-v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
working-directory: packages/openclaw-qveris-plugin
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
registry-url: https://registry.npmjs.org
27+
28+
- name: Verify package version matches tag
29+
run: |
30+
TAG_VERSION="${GITHUB_REF_NAME#qveris-plugin-v}"
31+
PKG_VERSION=$(node -p "require('./package.json').version")
32+
if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
33+
echo "::error::Tag version ($TAG_VERSION) does not match package.json version ($PKG_VERSION)"
34+
exit 1
35+
fi
36+
echo "VERSION=$PKG_VERSION" >> "$GITHUB_ENV"
37+
38+
- name: Verify npm package contents
39+
run: npm run check:pack
40+
41+
- name: Publish to npm
42+
run: npm publish --access public
43+
env:
44+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
45+
46+
- name: Create GitHub Release
47+
uses: softprops/action-gh-release@v2
48+
with:
49+
name: "QVeris OpenClaw Plugin v${{ env.VERSION }}"
50+
body: |
51+
## Install
52+
53+
```bash
54+
openclaw plugins install @qverisai/qveris@${{ env.VERSION }}
55+
```
56+
57+
## Highlights
58+
59+
- Publishes compiled JavaScript runtime files under `dist/`.
60+
- Points `openclaw.extensions` at `./dist/index.js` for current OpenClaw package-install compatibility.
61+
- Keeps TypeScript source in the package for inspection, but no longer depends on TypeScript runtime loading.
62+
63+
See [README](packages/openclaw-qveris-plugin/README.md) for usage.
64+
generate_release_notes: true

packages/openclaw-qveris-plugin/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@qverisai/qveris",
3-
"version": "2026.3.23",
3+
"version": "2026.6.4",
44
"description": "OpenClaw QVeris plugin — capability discovery, tool inspection, and tool calling",
55
"type": "module",
66
"files": [
@@ -38,7 +38,7 @@
3838
},
3939
"openclaw": {
4040
"extensions": [
41-
"./index.ts"
41+
"./dist/index.js"
4242
],
4343
"compat": {
4444
"pluginApi": ">=2026.3.22"

packages/openclaw-qveris-plugin/scripts/check-pack.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
import { execFileSync } from "node:child_process";
22
import { readFileSync } from "node:fs";
33

4+
const packageJson = JSON.parse(readFileSync("package.json", "utf8"));
5+
const extensions = packageJson.openclaw?.extensions;
6+
if (!Array.isArray(extensions) || !extensions.includes("./dist/index.js")) {
7+
fail("package.json openclaw.extensions must include the compiled runtime entry:", [
8+
'expected "./dist/index.js"',
9+
]);
10+
}
11+
if (extensions.some((entry) => typeof entry === "string" && /\.tsx?$/.test(entry))) {
12+
fail("package.json openclaw.extensions must not point at TypeScript source entries for npm packages:", extensions);
13+
}
14+
415
const requiredFiles = new Set([
516
"README.md",
617
"dist/index.js",

0 commit comments

Comments
 (0)