Skip to content

Commit becd99e

Browse files
committed
improve release notes and documentation
- Enhanced GitHub Actions release workflow with richer release notes - Updated CHANGELOG.md with current version (0.2.3) details - Updated README.md to reflect Husky v9 peer dependency requirement - Added automatic commit history and installation info to release notes
1 parent a7fb278 commit becd99e

File tree

3 files changed

+61
-8
lines changed

3 files changed

+61
-8
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,41 @@ jobs:
6868
id: changelog
6969
run: |
7070
VERSION="${{ steps.version.outputs.version }}"
71+
CHANGELOG_CONTENT=""
72+
73+
# Try to extract from CHANGELOG.md first
7174
if [ -f "CHANGELOG.md" ]; then
7275
# Extract changelog for current version
7376
awk "/^## \[$VERSION\]/{flag=1; next} /^## \[/{flag=0} flag" CHANGELOG.md > current_changelog.md
7477
if [ -s current_changelog.md ]; then
75-
echo "changelog<<EOF" >> $GITHUB_OUTPUT
76-
cat current_changelog.md >> $GITHUB_OUTPUT
77-
echo "EOF" >> $GITHUB_OUTPUT
78-
else
79-
echo "changelog=🚀 Release $VERSION" >> $GITHUB_OUTPUT
78+
echo "📋 **What's Changed**" > release_notes.md
79+
echo "" >> release_notes.md
80+
cat current_changelog.md >> release_notes.md
81+
echo "" >> release_notes.md
8082
fi
83+
fi
84+
85+
# Generate commit-based changelog since last tag
86+
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
87+
if [ -n "$PREV_TAG" ]; then
88+
echo "## 📝 Commits since $PREV_TAG" >> release_notes.md
89+
echo "" >> release_notes.md
90+
git log --pretty=format:"- %s (%h)" $PREV_TAG..HEAD >> release_notes.md
91+
echo "" >> release_notes.md
92+
fi
93+
94+
# Add package info
95+
echo "" >> release_notes.md
96+
echo "## 📦 Installation" >> release_notes.md
97+
echo "" >> release_notes.md
98+
echo "\`\`\`bash" >> release_notes.md
99+
echo "npm install @253eosam/commit-from-branch@$VERSION" >> release_notes.md
100+
echo "\`\`\`" >> release_notes.md
101+
102+
if [ -f "release_notes.md" ]; then
103+
echo "changelog<<EOF" >> $GITHUB_OUTPUT
104+
cat release_notes.md >> $GITHUB_OUTPUT
105+
echo "EOF" >> $GITHUB_OUTPUT
81106
else
82107
echo "changelog=🚀 Release $VERSION" >> $GITHUB_OUTPUT
83108
fi

CHANGELOG.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,32 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [0.2.0] - 2025-01-10
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [0.2.3] - 2024-09-16
11+
12+
### ✨ New Features
13+
- **Peer Dependency Support**: Added husky@^9.0.0 as peer dependency for clearer version requirements
14+
- **Enhanced Error Messages**: Improved installation guidance with clear step-by-step instructions
15+
16+
### 🔧 Code Quality Improvements
17+
- **Declarative Architecture**: Refactored cli.ts and init.ts from procedural to declarative approach
18+
- **Strategy Pattern**: Implemented strategy pattern for Husky initialization scenarios
19+
- **Command Handler Pattern**: Clean command routing in CLI with declarative handlers
20+
- **Simplified Validation**: Leveraged npm's peer dependency warnings instead of complex version checking
21+
22+
### 🧪 Testing
23+
- **Updated Test Suite**: Fixed test expectations to match new behavior
24+
- **Integration Tests**: All 31 tests passing with improved coverage
25+
26+
### 📚 Documentation
27+
- **CLAUDE.md**: Added comprehensive guide for future Claude Code instances
28+
- **Architecture Documentation**: Detailed explanation of functional pipeline and design patterns
29+
30+
## [0.2.0] - 2024-09-16
631

732
### 🎉 Major Refactoring - Declarative Architecture
833

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ Automatically formats your commit messages based on your branch name, extracting
2020
npm install @253eosam/commit-from-branch --save-dev
2121
```
2222

23+
> **Note**: This package requires Husky v9 as a peer dependency. npm will automatically warn you if it's not installed.
24+
2325
## Quick Start
2426

25-
1. **Install Husky** (if not already installed):
27+
1. **Install Husky v9** (if not already installed):
2628

2729
```bash
30+
npm install --save-dev husky@^9.0.0
2831
npx husky init
2932
```
3033

@@ -198,7 +201,7 @@ initHusky("/path/to/repo");
198201

199202
- Node.js >= 16
200203
- Git repository
201-
- Husky (for automatic setup)
204+
- Husky v9 (peer dependency)
202205

203206
## Contributing
204207

0 commit comments

Comments
 (0)