This documentation describes an automated GitHub workflow system that handles pull request labelling and automated releases for both development and production environments. The system uses branch naming conventions to automatically label PRs, generates release notes, and manages versioning.
pr-labeler.ymldev branchmain branchbreaking → Major version bumpfeature, fix → Minor version bumpchore, etc. → Patch version bump📦root
┣📦.github
┣ 📂workflows
┃ ┣ 📜pr-labeler.yml # PR labeling workflow
┃ ┣ 📜release-dev.yml # Development release workflow
┃ ┗ 📜release-prod.yml # Production release workflow
┣ 📜pr-labeler.yml # Label configuration
┗ 📜release-drafter.yml # Release configuration
To add or modify label patterns, edit .github/pr-labeler.yml:
# Add new label
enhancement: ["enhance/*", "improvement/*"]
# Modify existing label
feature:
- "feature/*"
- "feat/*"
- "new/*"
Edit .github/release-drafter.yml:
categories:
- title: '🚀 New Features' # Modified emoji and title
labels:
- 'feature'
- 'enhancement'
- title: '🔧 Improvements' # New category
labels:
- 'improvement'
# Add commit details
change-template: '- $TITLE (#$NUMBER)\n $COMMIT_MESSAGES'
template: |
## Release v$RESOLVED_VERSION
### What's Changed
$CHANGES
### Contributors
$CONTRIBUTORS
### Additional Notes
_Released on: $RELEASE_DATE_
<type>/<description>
Types:
feature/ → New features (minor version)
fix/ → Bug fixes (minor version)
chore/ → Maintenance (patch version)
breaking/ → Breaking changes (major version)
Examples:
feature/user-authentication
fix/login-timeout
chore/update-dependencies
breaking/api-v2
git checkout -b feature/new-login
git commit -m "feat: Add OAuth login"
git commit -m "Add password reset"
pr-labeler.ymldev or main).github dir with all files needs to be in both (dev and main)version-resolver configurationArticles
Thoughts, tutorials, and insights about web development, programming, and technology.
What is a JSON Web Token?
JSON Web Token is a self-contained and compact way for transmitting pieces of information between parties securing as a JSON object. Information is digitally signed so it can be verified. For digital signing, a secret (with the HMAC algorithm) or a public/private key pair using RSA or ECDSA.