File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,25 +12,30 @@ generate_categorized_changelog() {
1212
1313 echo " ## What's Changed"
1414
15+ # Store all commits in a temporary file
16+ all_commits=$( mktemp)
17+ $git_log_command --pretty=format:" * %s (%h)" --reverse > " $all_commits "
18+
1519 # Features
1620 echo " ### 🚀 Features"
17- $git_log_command --pretty=format: " * %s (%h) " --reverse | grep " ^* feat" || true
21+ grep -i " ^* feat: " " $all_commits " || true
1822
1923 # Bug Fixes
2024 echo -e " \n### 🐛 Bug Fixes"
21- $git_log_command --pretty=format: " * %s (%h) " --reverse | grep " ^* fix" || true
25+ grep -i " ^* fix: " " $all_commits " || true
2226
2327 # Documentation
2428 echo -e " \n### 📚 Documentation"
25- $git_log_command --pretty=format: " * %s (%h) " --reverse | grep " ^* docs" || true
29+ grep -i " ^* docs: " " $all_commits " || true
2630
2731 # Other Changes
2832 echo -e " \n### 🔧 Other Changes"
29- $git_log_command --pretty=format:" * %s (%h)" --reverse | grep -v " ^* feat\|^* fix\|^* docs" || true
33+ grep -i -v " ^* feat:\|^* fix:\|^* docs:" " $all_commits " || true
34+
35+ # Cleanup
36+ rm " $all_commits "
3037}
3138
32- # Usage in workflow:
33- # CHANGELOG=$(generate_categorized_changelog "$PREVIOUS_TAG")
34- # echo "CHANGELOG<<EOF" >> $GITHUB_ENV
35- # echo "$CHANGELOG" >> $GITHUB_ENV
36- # echo "EOF" >> $GITHUB_ENV
39+ # Usage example:
40+ # changelog=$(generate_categorized_changelog "v1.0.0")
41+ # echo "$changelog"
Original file line number Diff line number Diff line change @@ -244,6 +244,8 @@ jobs:
244244 name : ${{ env.VERSION }}
245245 body : |
246246 ${{ env.CHANGELOG }}
247+
248+
247249 **Full Changelog**: ${{ env.URL }}
248250 draft : false
249251 prerelease : false
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " python-template"
3- version = " 0.5.28 "
3+ version = " 0.5.29 "
44description = " Used to templatize python projects."
55authors = [" Loïc Motheu <lmotheu@gmail.com>" ]
66readme = " README.md"
You can’t perform that action at this time.
0 commit comments