惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Apple Machine Learning Research
Apple Machine Learning Research
aimingoo的专栏
aimingoo的专栏
H
Help Net Security
腾讯CDC
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
人人都是产品经理
人人都是产品经理
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | Blog
宝玉的分享
宝玉的分享
有赞技术团队
有赞技术团队
美团技术团队
雷峰网
雷峰网
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 司徒正美
博客园_首页
Recent Announcements
Recent Announcements
云风的 BLOG
云风的 BLOG
B
Blog RSS Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
D
Docker
博客园 - Franky
Jina AI
Jina AI

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
ci: publish ClawHub plugins as ClawPacks · openclaw/openc...
steipete · 2026-05-04 · via Recent Commits to openclaw:main

@@ -30,24 +30,100 @@ if ! command -v clawhub >/dev/null 2>&1; then

3030

exit 1

3131

fi

323233+

script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

34+

repo_root="$(cd "${script_dir}/.." && pwd)"

3335

package_name="$(node -e 'const pkg = require(require("node:path").resolve(process.argv[1], "package.json")); console.log(pkg.name)' "${package_dir}")"

3436

package_version="$(node -e 'const pkg = require(require("node:path").resolve(process.argv[1], "package.json")); console.log(pkg.version)' "${package_dir}")"

3537

publish_tag="${PACKAGE_TAG:-latest}"

3638

source_repo="${SOURCE_REPO:-${GITHUB_REPOSITORY:-openclaw/openclaw}}"

3739

source_commit="${SOURCE_COMMIT:-$(git rev-parse HEAD)}"

3840

source_ref="${SOURCE_REF:-$(git symbolic-ref -q HEAD || true)}"

3941

clawhub_workdir="${CLAWDHUB_WORKDIR:-${CLAWHUB_WORKDIR:-$(pwd)}}"

40-

publish_source="${package_dir}"

42+

package_source="${package_dir}"

414342-

if [[ "${publish_source}" != /* && "${publish_source}" != ./* ]]; then

43-

publish_source="./${publish_source}"

44+

if [[ "${package_source}" != /* && "${package_source}" != ./* ]]; then

45+

package_source="./${package_source}"

46+

fi

47+48+

pack_dir="$(mktemp -d "${RUNNER_TEMP:-/tmp}/openclaw-clawhub-pack.XXXXXX")"

49+

cleanup() {

50+

rm -rf "${pack_dir}"

51+

}

52+

trap cleanup EXIT

53+54+

pack_cmd=(

55+

clawhub

56+

package

57+

pack

58+

"${package_source}"

59+

--pack-destination

60+

"${pack_dir}"

61+

--json

62+

)

63+64+

build_package_runtime() {

65+

if [[ "${OPENCLAW_PLUGIN_NPM_RUNTIME_BUILD:-1}" == "0" || "${OPENCLAW_PLUGIN_NPM_RUNTIME_BUILD:-1}" == "false" ]]; then

66+

echo "Package-local runtime build: skipped"

67+

return

68+

fi

69+

echo "Package-local runtime build: ${package_dir}"

70+

node "${repo_root}/scripts/lib/plugin-npm-runtime-build.mjs" "${package_dir}" >&2

71+

}

72+73+

echo "Resolved package dir: ${package_dir}"

74+

echo "Resolved package source: ${package_source}"

75+

echo "Resolved package name: ${package_name}"

76+

echo "Resolved package version: ${package_version}"

77+

echo "Resolved publish tag: ${publish_tag}"

78+

echo "Resolved source repo: ${source_repo}"

79+

echo "Resolved source commit: ${source_commit}"

80+

echo "Resolved source ref: ${source_ref:-<missing>}"

81+

echo "Resolved ClawHub workdir: ${clawhub_workdir}"

82+

echo "Publish auth: GitHub Actions OIDC via ClawHub short-lived token"

83+84+

printf 'Pack command: CLAWHUB_WORKDIR=%q' "${clawhub_workdir}"

85+

printf ' %q' "${pack_cmd[@]}"

86+

printf '\n'

87+88+

build_package_runtime

89+90+

pack_json="${pack_dir}/pack.json"

91+

CLAWHUB_WORKDIR="${clawhub_workdir}" \

92+

node "${repo_root}/scripts/lib/plugin-npm-package-manifest.mjs" --run "${package_dir}" -- \

93+

"${pack_cmd[@]}" > "${pack_json}"

94+

pack_output="$(cat "${pack_json}")"

95+

printf '%s\n' "${pack_output}"

96+97+

pack_path="$(

98+

PACK_OUTPUT="${pack_output}" node --input-type=module <<'EOF'

99+

import { resolve } from "node:path";

100+101+

const raw = process.env.PACK_OUTPUT ?? "";

102+

let parsed;

103+

try {

104+

parsed = JSON.parse(raw);

105+

} catch (error) {

106+

console.error(`clawhub package pack did not return JSON: ${error instanceof Error ? error.message : String(error)}`);

107+

process.exit(1);

108+

}

109+

if (!parsed || typeof parsed.path !== "string" || parsed.path.trim() === "") {

110+

console.error("clawhub package pack output did not include a tarball path.");

111+

process.exit(1);

112+

}

113+

console.log(resolve(parsed.path));

114+

EOF

115+

)"

116+117+

if [[ ! -f "${pack_path}" ]]; then

118+

echo "ClawPack tarball not found: ${pack_path}" >&2

119+

exit 1

44120

fi

4512146122

publish_cmd=(

47123

clawhub

48124

package

49125

publish

50-

"${publish_source}"

126+

"${pack_path}"

51127

--tags

52128

"${publish_tag}"

53129

--source-repo

@@ -65,16 +141,7 @@ if [[ -n "${source_ref}" ]]; then

65141

)

66142

fi

6714368-

echo "Resolved package dir: ${package_dir}"

69-

echo "Resolved publish source: ${publish_source}"

70-

echo "Resolved package name: ${package_name}"

71-

echo "Resolved package version: ${package_version}"

72-

echo "Resolved publish tag: ${publish_tag}"

73-

echo "Resolved source repo: ${source_repo}"

74-

echo "Resolved source commit: ${source_commit}"

75-

echo "Resolved source ref: ${source_ref:-<missing>}"

76-

echo "Resolved ClawHub workdir: ${clawhub_workdir}"

77-

echo "Publish auth: GitHub Actions OIDC via ClawHub short-lived token"

144+

echo "Resolved ClawPack: ${pack_path}"

7814579146

printf 'Publish command: CLAWHUB_WORKDIR=%q' "${clawhub_workdir}"

80147

printf ' %q' "${publish_cmd[@]}"