Skip to content

ci: 加入三組 GitHub Actions(SKILL 驗證 / Markdown 檢查 / Release Drafter) - #1

Merged
JoshuaWangTW merged 3 commits into
mainfrom
add-github-actions
May 5, 2026
Merged

JoshuaWangTW merged 3 commits into
mainfrom
add-github-actions

Conversation

@JoshuaWangTW

Copy link
Copy Markdown
Owner

Summary

為 SlimStack 加上三條 CI 工作流,全部以「文件型 repo」的需求為主:

  • validate-skills.yml — PR 與 push 到 main 時,跑 scripts/validate_skills.py
    • 每個頂層資料夾若有 SKILL.md,視為 skill
    • 檢查 frontmatter 必有 name / description
    • 子資料夾的 name 必須跟資料夾名一致(root SKILL.md 例外,因為它是 router)
    • 本地實測:目前 17 個 SKILL.md 全部通過 ✅
  • markdown-check.yml — markdownlint + lychee link check
    • .markdownlint.jsonc 採寬鬆規則,避免一上線就被中文長行 / inline HTML 卡住
    • lychee 設定 fail: false,初期僅報告壞連結不擋 PR;確認所有外部連結都正常後可改成 true
    • 加了 .lycheeignore 範例,方便加入會 rate-limit 的網域
  • release-drafter.yml + .github/release-drafter.yml
    • PR 合併後自動更新 release draft
    • 依標籤分類:skill:new / skill:update / bug / docs / chore
    • 版號自動推進:breaking → major、skill:new → minor、其他 → patch

Test plan

  • 本 PR 觸發 validate-skillsmarkdown-check,兩者都應通過
  • 合併後 release-drafter 應建立第一份 draft release(v0.0.1 或 v0.1.0,依 PR 標籤)
  • 之後在 PR 加 skill:new 標籤,merge 後 draft 版號應跳到 minor

Follow-ups

  • 視 lychee 第一次跑的結果,把 fail: false 改回 true
  • 可選:之後加 auto-labeler workflow 依改動的資料夾自動上 skill:* 標籤

…lease drafting

- validate-skills: parse SKILL.md frontmatter and check name/description fields,
  ensuring `name` matches its folder
- markdown-check: markdownlint-cli2 + lychee link checker (lenient config,
  link failures non-blocking initially)
- release-drafter: auto-draft release notes grouped by skill/bug/docs labels
…pushes

- markdownlint: disable MD022/MD031/MD032 (blank-line style around headings,
  fences, lists) so existing SKILL.md prose is not blocked. Real defects
  (broken refs, duplicate ids, etc.) are still caught.
- release-drafter: drop pull_request trigger. The action reads its config
  from the default branch, so PRs that introduce the config will fail
  spuriously. Drafts now update on push to main only.
@JoshuaWangTW
JoshuaWangTW merged commit 10b9d57 into main May 5, 2026
3 checks passed
@JoshuaWangTW
JoshuaWangTW deleted the add-github-actions branch May 5, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant