Skip to content

Commit

Permalink
feat: changelog automation
Browse files Browse the repository at this point in the history
Signed-off-by: Gita Alekhya Paul <54375111+gitaalekhyapaul@users.noreply.github.com>
  • Loading branch information
gitaalekhyapaul committed Dec 23, 2024
1 parent 17c2615 commit 09aaadc
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/changelog-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
changelog:
exclude:
labels:
- ignore-for-release
authors:
- dependabot
categories:
- title: 🚀 Features
labels:
- enhancement
- feature
- title: 🐛 Bug Fixes
labels:
- bug
- fix
- title: 🧰 Maintenance
labels:
- chore
- dependencies
- title: 📝 Documentation
labels:
- documentation
34 changes: 34 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Generate Changelog

on:
release:
types: [created]

jobs:
generate-changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Generate Changelog
run: |
# Install github-changelog-generator if not using container
gem install github_changelog_generator
# Generate changelog
github_changelog_generator \
-u ${{ github.repository_owner }} \
-p ${{ github.event.repository.name }} \
--token ${{ secrets.GITHUB_TOKEN }} \
--since-tag $(git describe --tags --abbrev=0 `git rev-list --tags --skip=1 --max-count=1`) \
--future-release ${{ github.event.release.tag_name }}
- name: Commit and Push Changelog
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add CHANGELOG.md
git commit -m "docs: update changelog for ${{ github.event.release.tag_name }}"
git push
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,3 +350,21 @@ TOKEN_DETAILS_PATH=token.jsonc
- Express.js: https://expressjs.com/
- Tailwind CSS: https://tailwindcss.com/docs 💅
- TypeScript: https://www.typescriptlang.org/docs/ 📘

## 📝 Contributing

### Commit Message Format

Follow these commit message guidelines to automate changelog generation:

- `feat: add new feature` - New features (generates under 🚀 Features)
- `fix: resolve bug` - Bug fixes (generates under 🐛 Bug Fixes)
- `docs: update readme` - Documentation changes (generates under 📝 Documentation)
- `chore: update deps` - Maintenance (generates under 🧰 Maintenance)

Example:

```bash
git commit -m "feat: add OAuth support for Discord"
git commit -m "fix: resolve token validation issue"
```

0 comments on commit 09aaadc

Please sign in to comment.