When a version bump PR merges on Lightprotocol/light-protocol, a GitHub Action generates a Mintlify <Update> changelog entry and opens a PR on this docs repo.
The real changes are in the ~20 PRs merged between consecutive version bumps (fixes, features, security items), not in the bump PR itself.
- Trigger:
repository_dispatchfrom light-protocol after release, or manualworkflow_dispatchwith PR number - Context fetch: bash step fetches the release PR body and all inter-release PRs via
ghCLI - Generation:
claude-code-action@v1reads the context, categorizes PRs, and writes a new<Update>entry inchangelog.mdx - PR creation:
peter-evans/create-pull-request@v5opens a PR for human review
| Trigger | When | Payload |
|---|---|---|
repository_dispatch type new-release |
Automated: light-protocol sends after release | { pr_number, version, commit } |
workflow_dispatch |
Manual fallback | Paste the bump PR number (e.g. 2293) |
| PR | Labels | Generated by |
|---|---|---|
| #2272 | [release] |
create-release-pr.sh (automated, body has old -> new versions) |
| #2293 | none | publish-local.sh (manual, body has only new versions) |
Individual release tags (e.g., light-sdk-v0.22.0) have empty bodies. The workflow reads the bump PR to find versions and the inter-release PRs for actual changes.
The bash step fetches four things:
- Release PR body ->
/tmp/release-pr.json(version bump list, merge date) - Primary version — extracts
light-sdkversion as canonical (e.g.,0.22.0). Falls back to first crate listed. - Previous bump PR merge date — most recent merged PR with "bump" in the title before this one. Falls back to epoch if none found.
- Inter-release PRs ->
/tmp/inter-release-prs.json— all PRs merged between the two bump dates, excluding bump PRs
Claude receives the context files and changelog.mdx. It:
-
Categorizes PRs:
- Security: titles with
(L-xx),(M-xx),(H-xx)suffixes (audit findings) - Features:
feat:prefix - Fixes:
fix:prefix - Refactors:
refactor:prefix - Skips
chore:/test:from highlights (keeps them in the table)
- Security: titles with
-
Selects tags from:
SDK,Programs,Security,Token,Tooling -
Writes the
<Update>block:
<Update label="{Month Year}" description="v{version}" tags={["SDK", "Security"]}>
### Highlights
- 3-5 terse bullets, most important first
- Link PR numbers: [#123](https://github.com/Lightprotocol/light-protocol/pull/123)
### Breaking changes
(only if applicable, otherwise omitted)
### All changes
| PR | Description |
|:---|:------------|
| [#xxx](link) | one-line description |
</Update>- Inserts after frontmatter, before existing entries
- No promotional language ("exciting", "comprehensive", "enables")
- Imperative mood ("fix", "add", "reject" — not "fixed", "added")
- One sentence per bullet, max 15 words
- Sentence case headings
- Drop
fix:/feat:prefixes in table descriptions
--max-turns 10prevents runaway--model claude-sonnet-4-5-20250929- Restricted tools:
Read,Edit,Bash
| Secret | Repo | Purpose |
|---|---|---|
ANTHROPIC_API_KEY |
docs repo | Claude Code API |
GITHUB_TOKEN |
docs repo (auto) | Read public light-protocol PRs |
DOCS_DISPATCH_TOKEN |
light-protocol repo | POST repository_dispatch to docs repo |
- No inter-release PRs (
pr_count=0): Claude and PR creation steps skip viaifcondition - Manual release (no dispatch): use
workflow_dispatchwith PR number - PR body format differs: regex handles both
X.Y.Z -> A.B.Candcrate: A.B.C - No previous bump PR found: falls back to epoch, captures all history
- Duplicate runs: branch name includes version (
changelog/v0.22.0), re-run updates the same PR
- Manually trigger
workflow_dispatchwith PR2293 - Check the generated PR edits
changelog.mdxcorrectly - Run
npm run format:check && npm run lint && npm run spellcheckon the branch - Verify the
<Update>block renders in Mintlify preview