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: