docs/release-notes-generation.md
MCPProxy uses AI-powered release notes generation to create human-readable release summaries automatically when new versions are tagged.
When a version tag is pushed (e.g., v1.0.5), the release workflow:
Add ANTHROPIC_API_KEY to your GitHub repository secrets:
ANTHROPIC_API_KEYCost: Estimated ~$0.01-0.05 per release (claude-sonnet-4-5-20250929 model)
The generate-notes job in .github/workflows/release.yml:
generate-notes:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
outputs:
notes: ${{ steps.generate.outputs.notes }}
notes_file: ${{ steps.generate.outputs.notes_file }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for git log
# ... generate notes with Claude API
git log --pretty=format:"- %s" --no-mergesGenerated notes follow this structure:
## What's New in v1.0.5
Brief 1-2 sentence summary of this release.
### New Features
- Feature description with user benefit
### Bug Fixes
- Fix description
### Breaking Changes
- Change requiring user action
### Improvements
- Enhancement to existing features
Test release notes generation before pushing tags:
# Set your API key
export ANTHROPIC_API_KEY="your-key-here"
# Generate notes for a specific version
./scripts/generate-release-notes.sh v1.0.5
# Generate notes for current HEAD (auto-detect version)
./scripts/generate-release-notes.sh
# Customize behavior
MAX_TOKENS=512 ./scripts/generate-release-notes.sh v1.0.5
| Variable | Default | Description |
|---|---|---|
ANTHROPIC_API_KEY | (required) | Claude API key |
CLAUDE_MODEL | claude-sonnet-4-5-20250929 | Model to use |
MAX_TOKENS | 1024 | Maximum output tokens |
MAX_COMMITS | 200 | Maximum commits to include |
API_TIMEOUT | 30 | API timeout in seconds |
Release notes are automatically included when available:
RELEASE_NOTES.mdRelease notes are installed to documentation folder:
{app}\docs\RELEASE_NOTES.mdIf the Claude API call fails, the release continues with a fallback message:
## What's New in v1.0.5
Release notes could not be generated automatically.
Please see the commit history for detailed changes.
Releases are never blocked by API failures.
| Issue | Solution |
|---|---|
| "API key not set" | Add ANTHROPIC_API_KEY to GitHub Secrets |
| "Rate limit exceeded" | Wait and retry, or use a different model |
| "Timeout" | Increase API_TIMEOUT or reduce MAX_COMMITS |
| "Empty response" | Check API key validity at console.anthropic.com |
The prompt instructs Claude to:
To modify the prompt, edit the build_prompt() function in scripts/generate-release-notes.sh.
Release notes generation adds approximately:
In GitHub Actions:
# Verbose output
set -x
./scripts/generate-release-notes.sh v1.0.5
# Check curl response
curl -v https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "content-type: application/json" \
-H "anthropic-version: 2023-06-01" \
-d '{"model":"claude-sonnet-4-5-20250929","max_tokens":100,"messages":[{"role":"user","content":"Hello"}]}'