Skip to content

Commit b5df6c8

Browse files
committed
feat: add comprehensive automated release system with GitHub Actions
- Add GitHub Actions workflow for creating release PRs with smart version detection - Add Rake tasks for local release management with automatic version bumping - Add interactive release script with commit analysis and suggestions - Add automatic changelog generation from conventional commits - Add comprehensive documentation for release workflows - Support multiple release workflows: GitHub Actions (web UI), Rake tasks (CLI), and interactive scripts - Include intelligent commit analysis to suggest appropriate version bumps (major/minor/patch) - Add dry-run mode for previewing releases before creation - Support both manual and automatic version detection - Add team-friendly PR-based release workflow with built-in reviews This provides a complete release automation system supporting: - 🚀 GitHub Actions: Web-based release creation with PR workflow - 🧠 Smart Analysis: Automatic version bump suggestions from commit history - 📝 Auto Changelog: Generate changelogs from conventional commit messages - 🎯 Multi-Channel: Web UI, command line, and interactive script options - 👥 Team Collaboration: PR-based reviews before release publishing - 🛡️ Built-in Safety: Comprehensive testing and validation before releases
1 parent cc5f37c commit b5df6c8

12 files changed

Lines changed: 1334 additions & 2 deletions

File tree

.github/RELEASE.md

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# Release Configuration
2+
3+
This project provides multiple release workflows: fully automated GitHub Actions, local Rake tasks, and interactive scripts.
4+
5+
## 🚀 Automated GitHub Actions Release (Recommended)
6+
7+
The easiest way to create releases using GitHub's web interface.
8+
9+
### Quick Start
10+
11+
1. **Navigate to** [Actions tab](https://github.com/markhallen/slack-github-threads/actions)
12+
2. **Click** "Create Release PR" workflow
13+
3. **Click** "Run workflow" button
14+
4. **Choose options**:
15+
- **Release Type**: `auto` (recommended), `major`, `minor`, or `patch`
16+
- **Dry Run**: Check this to preview without creating actual release
17+
5. **Click** "Run workflow"
18+
6. **Review and merge** the automatically created PR
19+
7. **Release publishes automatically** when PR is merged
20+
21+
### What the GitHub Action Does
22+
23+
1. **Analyzes commits** since last release
24+
2. **Suggests appropriate version bump** (if `auto` selected)
25+
3. **Runs full test suite** to ensure quality
26+
4. **Generates changelog** from conventional commits
27+
5. **Creates release branch** with version bump
28+
6. **Opens PR** with detailed release information
29+
7. **Auto-releases** when PR is merged
30+
31+
### Workflow Options
32+
33+
| Option | Description | When to Use |
34+
| --------- | ------------------------------------------------- | ----------------------------- |
35+
| `auto` | System analyzes commits and suggests release type | Most releases |
36+
| `major` | Force major version bump (breaking changes) | API changes, major refactors |
37+
| `minor` | Force minor version bump (new features) | New functionality |
38+
| `patch` | Force patch version bump (bug fixes) | Bug fixes, small improvements |
39+
| `dry_run` | Preview mode - no actual release created | Testing, planning |
40+
41+
## 🧠 Local Rake Tasks
42+
43+
For developers who prefer command-line workflows.
44+
45+
### Key Features
46+
47+
1. **Automatic Changelog Generation**: Parses git commit messages since the last tag
48+
2. **Conventional Commit Support**: Categorizes commits based on conventional commit patterns
49+
3. **Integrated Testing**: Runs full CI checks before creating releases
50+
4. **Git Tag Management**: Automatically creates and manages version tags
51+
52+
## Creating a Release
53+
54+
### Method 1: Rake Task (Recommended)
55+
56+
```bash
57+
# Preview unreleased changes
58+
rake release:preview
59+
60+
# Create release with automatic changelog generation
61+
rake release:create[1.1.0]
62+
63+
# Push changes and tag
64+
git push origin main && git push origin v1.1.0
65+
```
66+
67+
### Method 2: Release Script
68+
69+
```bash
70+
# One command that handles everything including the push
71+
./scripts/release.sh 1.1.0
72+
```
73+
74+
## Commit Message Conventions
75+
76+
The automatic changelog generation works best with conventional commit messages:
77+
78+
| Commit Pattern | Changelog Section | Example |
79+
| ---------------------------- | ----------------- | ---------------------------------- |
80+
| `feat:`, `add`, `implement` | **Added** | `feat: add webhook support` |
81+
| `fix:`, `bug`, `resolve` | **Fixed** | `fix: resolve timeout issue` |
82+
| `chore:`, `update`, `change` | **Changed** | `chore: update dependencies` |
83+
| `docs:`, `documentation` | **Changed** | `docs: improve API documentation` |
84+
| `remove`, `delete` | **Removed** | `remove: delete deprecated method` |
85+
| `security`, `sec:` | **Security** | `security: fix XSS vulnerability` |
86+
87+
## Manual Changelog Updates
88+
89+
If you prefer manual changelog management:
90+
91+
1. Edit `CHANGELOG.md` directly with your changes
92+
2. Use `rake release:create[1.1.0]` - it will preserve manual entries
93+
3. The Rake task will add the version and date automatically
94+
95+
## Release Checklist
96+
97+
Before creating a release, ensure:
98+
99+
- [ ] All tests pass locally
100+
- [ ] CHANGELOG.md is updated with the new version
101+
- [ ] Version follows semantic versioning (MAJOR.MINOR.PATCH)
102+
- [ ] Documentation is up to date
103+
- [ ] No sensitive information is included in the release
104+
105+
## Manual Release (if needed)
106+
107+
If you need to create a release manually:
108+
109+
1. Go to the [Releases page](https://github.com/markhallen/slack-github-threads/releases)
110+
2. Click "Create a new release"
111+
3. Choose your tag or create a new one
112+
4. Fill in the release title and description
113+
5. Upload any additional assets if needed
114+
115+
## Version Tag Format
116+
117+
Always use the format `v<MAJOR>.<MINOR>.<PATCH>` for version tags:
118+
119+
- `v1.0.0` - Major release
120+
- `v1.1.0` - Minor release
121+
- `v1.0.1` - Patch release

.github/release.conf

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Release Configuration for slack-github-threads
2+
3+
# Default settings for automated releases
4+
RELEASE_BRANCH=main
5+
PACKAGE_NAME=slack-github-threads
6+
CHANGELOG_FILE=CHANGELOG.md
7+
8+
# Files to exclude from release archives
9+
EXCLUDE_PATTERNS=(
10+
'.git*'
11+
'test/'
12+
'log/*.log'
13+
'.env*'
14+
'tmp/'
15+
'*.tmp'
16+
'.DS_Store'
17+
)
18+
19+
# Required checks before release
20+
PRE_RELEASE_CHECKS=(
21+
'syntax'
22+
'rubocop'
23+
'test'
24+
)
25+
26+
# Conventional commit patterns for changelog generation
27+
# These patterns are used by the Rake tasks to categorize commits
28+
COMMIT_PATTERNS=(
29+
# Added section
30+
"feat(\(.+\))?:|add|implement -> Added"
31+
32+
# Fixed section
33+
"fix(\(.+\))?:|bug|resolve -> Fixed"
34+
35+
# Changed section
36+
"chore(\(.+\))?:|update|change|modify -> Changed"
37+
"docs(\(.+\))?:|documentation -> Changed"
38+
"style(\(.+\))?:|format -> Changed"
39+
"refactor(\(.+\))?: -> Changed"
40+
"perf(\(.+\))?:|performance -> Changed"
41+
"test(\(.+\))?: -> Changed"
42+
43+
# Removed section
44+
"remove|delete -> Removed"
45+
46+
# Security section
47+
"security|sec: -> Security"
48+
49+
# Deprecated section
50+
"deprecate -> Deprecated"
51+
)
52+
53+
# Post-release notifications (optional)
54+
# Set these environment variables if you want notifications
55+
# SLACK_WEBHOOK_URL=""
56+
# DISCORD_WEBHOOK_URL=""
57+
58+
# GitHub release settings
59+
GITHUB_RELEASE_DRAFT=false
60+
GITHUB_RELEASE_PRERELEASE=false
61+
GITHUB_GENERATE_RELEASE_NOTES=true
62+
63+
# Rake task shortcuts
64+
# rake release:preview - Preview unreleased changes
65+
# rake release:changelog[VERSION] - Generate changelog for version
66+
# rake release:create[VERSION] - Full release process

0 commit comments

Comments
 (0)