A GitHub App that automates your release management process using AI to generate summaries, manage version numbers, and create draft PRs and releases.
- Automated Release Flow: Seamlessly manages the flow from feature branches to staging to release
- AI-Generated Summaries: Uses OpenAI to create concise, contextual summaries of changes
- Smart Version Management: Automatically determines semantic version increments (MAJOR/MINOR/PATCH) based on AI analysis of changes
- Structured Release Notes: Organizes changes into "New Features" and "Bugs / Improvements" sections
- GitHub Releases: Automatically creates properly tagged GitHub releases when staging is merged to release
- PR Attribution: Tracks the original PR author and number in release notes
-
Create a GitHub App:
- Go to GitHub profile → Settings → Developer settings → GitHub Apps → New GitHub App
- Fill in required details:
- Name: AutoRelease (or your preferred name)
- Homepage URL: Your repository URL
- Webhook URL: Where your app will receive events (update later)
- Webhook Secret: Generate a secure random string
- Set Permissions:
- Repository permissions:
- Contents: Read & write
- Pull requests: Read & write
- Issues: Read & write
- Metadata: Read-only
- Subscribe to events:
- Pull request
- Push
- Repository permissions:
- Save the App
-
Generate Private Key:
- In your GitHub App settings
- Under "Private keys", click "Generate a private key"
- Save the downloaded .pem file securely
-
Install the App:
- Go to your GitHub App settings
- Click "Install App" in the sidebar
- Choose the repositories where you want to use AutoRelease
- Node.js 18 or higher
- Yarn or npm
- OpenAI API key
-
Clone the repository:
git clone https://github.com/rbkayz/autorelease.git cd autorelease
-
Install dependencies:
yarn install
-
Create environment file: Create a
.env
file with the following variables:# GitHub App Configuration APP_ID=your_github_app_id GITHUB_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nYour private key content with \n for line breaks\n-----END RSA PRIVATE KEY-----\n" WEBHOOK_SECRET=your_webhook_secret # Server Configuration PORT=8888 WEBHOOK_PROXY_URL=https://smee.io/your-channel-id (optional, for local development) # OpenAI Configuration OPENAI_API_KEY=your_openai_api_key
-
Build the application:
yarn build
-
Start the server:
yarn start
For easier deployment, you can use Docker:
-
Build the Docker image:
yarn docker:build
-
Run with Docker:
yarn docker:run
This will start the container with the environment variables from your
.env
file. -
Push to a Docker registry (optional):
yarn docker:push
-
Stop the container:
yarn docker:stop
-
Combined build, push and run:
yarn docker:deploy
Create a configuration file in your repository at:
release-manager-app/
├── .github/
│ └── release-manager.json # Example configuration
├── src/ # TypeScript source code
│ ├── lib/ # Service modules
│ │ ├── ai-service.ts # AI service for generating summaries
│ │ ├── config-service.ts # Configuration management
│ │ ├── pr-service.ts # PR management service
│ │ └── release-service.ts # Release and changelog service
│ ├── types/ # TypeScript type definitions
│ │ ├── probot.d.ts # Probot type definitions
│ │ └── octokit.d.ts # Octokit type definitions
│ └── index.ts # Main application entry point
├── dist/ # Compiled JavaScript (generated)
├── .env # Environment variables (not committed)
├── .env.example # Example environment variables
├── .gitignore # Git ignore file
├── tsconfig.json # TypeScript configuration
├── package.json # Node.js package config
└── README.md # This README
-
Branch Structure:
- Create a
staging
branch (or configure your preferred branch name in the config) - Use your
main
branch for production code
- Create a
-
Configuration:
- Create a
.github/release-manager.json
file in your repository with your preferred settings (see Configuration)
- Create a
-
Development Flow:
- Developers merge feature branches into
staging
- The app automatically generates AI summaries of the features
- When ready for release, the app creates a draft PR from
staging
tomain
- Review the PR, update the version tag if needed, and merge
- The app automatically creates a GitHub release and updates the changelog
- Developers merge feature branches into
release-manager-app/
├── .github/
│ └── release-manager.json # Example configuration
├── src/ # TypeScript source code
│ ├── lib/ # Service modules
│ │ ├── ai-service.ts # AI service for generating summaries
│ │ ├── config-service.ts # Configuration management
│ │ ├── pr-service.ts # PR management service
│ │ └── release-service.ts # Release and changelog service
│ ├── types/ # TypeScript type definitions
│ │ ├── probot.d.ts # Probot type definitions
│ │ └── octokit.d.ts # Octokit type definitions
│ └── index.ts # Main application entry point
├── dist/ # Compiled JavaScript (generated)
├── .env # Environment variables (not committed)
├── .env.example # Example environment variables
├── .gitignore # Git ignore file
├── tsconfig.json # TypeScript configuration
├── package.json # Node.js package config
└── README.md # This README
This project is written in TypeScript for better type safety and developer experience. The TypeScript code in the src
directory is compiled to JavaScript in the dist
directory.
To compile the TypeScript code:
npm run build
To run the app in development mode with automatic reloading:
npm run dev
To run tests:
npm test
To test the app locally:
-
Install smee-client for webhook forwarding:
npm install -g smee-client
-
Create a Smee channel:
- Go to smee.io
- Click "Start a new channel"
- Copy the webhook proxy URL
-
Update your GitHub App's webhook URL to the Smee URL
-
Start the Smee client:
smee --url https://smee.io/your-channel-id --path /webhook --port 3000
-
Start your app:
npm run dev
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.