From 4b15c6d99c5cba233b5203329eed7de2ab188c79 Mon Sep 17 00:00:00 2001 From: chendelian <116870791@qq.com> Date: Sun, 12 Apr 2026 09:10:58 +0800 Subject: [PATCH] ci: sync readme_md and description from references/README.md with SKILL.md fallback Made-with: Cursor --- .github/workflows/reusable-release-skill.yaml | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-release-skill.yaml b/.github/workflows/reusable-release-skill.yaml index 9f3d88d..9397455 100644 --- a/.github/workflows/reusable-release-skill.yaml +++ b/.github/workflows/reusable-release-skill.yaml @@ -76,7 +76,26 @@ jobs: import frontmatter, os, json, shutil post = frontmatter.load('SKILL.md') metadata = dict(post.metadata or {}) - metadata['readme_md'] = (post.content or '').strip() + skill_readme_md = (post.content or '').strip() + skill_description = metadata.get('description') + metadata['readme_md'] = skill_readme_md + readme_path = os.path.join('references', 'README.md') + if os.path.isfile(readme_path): + try: + readme_post = frontmatter.load(readme_path) + body = (readme_post.content or '').strip() + rm_meta = readme_post.metadata or {} + desc = rm_meta.get('description') + if desc is not None and str(desc).strip(): + metadata['description'] = str(desc).strip() + if body: + metadata['readme_md'] = body + except Exception: + pass + if not (metadata.get('readme_md') or '').strip(): + metadata['readme_md'] = skill_readme_md + if skill_description is not None and not str(metadata.get('description', '') or '').strip(): + metadata['description'] = skill_description openclaw_meta = metadata.get('metadata', {}).get('openclaw', {}) slug = (openclaw_meta.get('slug') or metadata.get('slug') or metadata.get('name') or '').strip() if not slug: