Bubble is a Node.js CLI tool that generates releases and release notes using AI by analysing git commit messages. Perfect for automated release management in GitHub Actions workflows.
- 🤖 AI-powered release notes using OpenAI
- 🏷️ Automatically detects commits between tags
- 🚀 Works seamlessly in GitHub Actions
- 🎨 Generates clean, categorised Markdown
Create .github/workflows/release.yml:
name: Release
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
- name: Generate Release Notes
run: |
npx github:davegarvey/bubble \
--latest \
--repo ${{ github.repository }} \
--github-token ${{ secrets.GITHUB_TOKEN }} \
--api-key ${{ secrets.OPENAI_API_KEY }} - name: Generate Release Notes with Custom Style
run: |
npx github:davegarvey/bubble \
--latest \
--repo ${{ github.repository }} \
--github-token ${{ secrets.GITHUB_TOKEN }} \
--api-key ${{ secrets.OPENAI_API_KEY }} \
--instructions-extend "- Use emojis for each category
- Highlight any security fixes in bold
- Include upgrade instructions for breaking changes"Add your OpenAI API key to GitHub Secrets:
- Go to repository Settings → Secrets and variables → Actions
- Add
OPENAI_API_KEYwith your OpenAI API key - Done!
GITHUB_TOKENis automatically available
Note: When using
npx github:davegarvey/bubblein GitHub Actions, theGITHUB_TOKENmay not be automatically detected. If you encounter authentication errors, explicitly set the token in your workflow'senvsection:env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- Create a tag:
git tag v1.0.0 && git push --tags - Go to Actions tab in your repository
- Run "Release" workflow
- Done! Check your releases page
--latest- Use the most recent tag (auto-detected)--tag <tag>- Specific Git tag to generate release notes for--repo <repo>- Repository in formatowner/repo(or setGITHUB_REPOSITORYenv var)--api-key <key>- API key for AI provider (or setOPENAI_API_KEYenv var)
--github-token <token>- GitHub token for API access (or setGITHUB_TOKENenv var)--dry-run- Generate notes without creating release--previous-tag <tag>- Previous tag to compare against (auto-detected if not provided)--provider <provider>- AI provider to use (default:openai)--model <model>- AI model to use (default:gpt-4-mini)--include-diffs- Include git diffs for each commit to provide more context to AI--include-readme- Include README.md content for project context (default: true)
For CI/CD scenarios, you can customize the AI instructions:
--instructions <text>- Replace the default instructions entirely with your custom instructions--instructions-extend <text>- Extend the default instructions by appending additional guidelines
Examples:
# Extend the default instructions with custom guidelines
npx github:davegarvey/bubble \
--latest \
--repo owner/repo \
--github-token $GITHUB_TOKEN \
--api-key $OPENAI_API_KEY \
--instructions-extend "- Include emoji indicators for each category\n- Mention any database migrations"
# Replace the entire instructions with custom ones
npx github:davegarvey/bubble \
--latest \
--repo owner/repo \
--github-token $GITHUB_TOKEN \
--api-key $OPENAI_API_KEY \
--instructions "You are a technical writer. Create brief release notes in bullet points. Focus only on breaking changes and new features."Default Behavior: If neither option is specified, the tool uses its built-in default instructions unchanged.
Architecture: This tool uses OpenAI's Responses API with XML-tagged data for clear separation between instructions and commit information. See Architecture Documentation for details.
-
Features
- Instructions Customization - Detailed examples for different use cases
-
Architecture Decision Records (ADRs)
- ADR-001: XML-Tagged Data - Why we use XML tags
- OpenAI Responses API Architecture - System design and best practices
- Instructions-Data Separation Implementation - Code changes and modifications
The AI generates well-structured release notes like:
## 🎉 New Features
- Added user authentication with OAuth2 support
- Implemented dark mode toggle in settings
## 🐛 Bug Fixes
- Fixed memory leak in data processing pipeline
- Resolved race condition in concurrent requests
## 📚 Documentation
- Updated API documentation with new endpoints
- Added migration guide for v2.0
---
**Full Changelog**: 12 commit(s) from a1b2c3d4 to e5f6g7h8MIT
Contributions are welcome! Please feel free to submit a Pull Request.