Skip to content

Commit 8b9ed34

Browse files
committed
add pull request and release process templates
1 parent 3f46590 commit 8b9ed34

2 files changed

Lines changed: 251 additions & 0 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## Description
2+
3+
<!-- Describe your changes in detail -->
4+
5+
## Type of Change
6+
7+
<!-- Put an 'x' in all boxes that apply -->
8+
9+
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
10+
- [ ] ✨ New feature (non-breaking change which adds functionality)
11+
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
12+
- [ ] 📝 Documentation update
13+
- [ ] 🌍 Translation update (automated from Crowdin)
14+
- [ ] 🎨 Style/UI change
15+
- [ ] ♻️ Refactoring (no functional changes)
16+
- [ ] ⚡ Performance improvement
17+
- [ ] ✅ Test update
18+
19+
## Testing
20+
21+
<!-- Describe how you tested your changes -->
22+
23+
- [ ] Tested locally
24+
- [ ] All tests pass (`npm test`)
25+
- [ ] Added new tests (if applicable)
26+
27+
## Screenshots (if applicable)
28+
29+
<!-- Add screenshots to help explain your changes -->
30+
31+
## Checklist
32+
33+
- [ ] My code follows the style guidelines of this project
34+
- [ ] I have performed a self-review of my code
35+
- [ ] I have commented my code, particularly in hard-to-understand areas
36+
- [ ] My changes generate no new warnings
37+
- [ ] Any dependent changes have been merged and published
38+
39+
## Related Issues
40+
41+
<!-- Link related issues here using #issue_number -->
42+
43+
Closes #

RELEASE.md

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
# Release Process
2+
3+
This document describes the release process for LIVCK Discord Bot.
4+
5+
## 🚀 Creating a Release
6+
7+
### 1. Prepare the Release
8+
9+
1. **Update version in `package.json`:**
10+
```bash
11+
npm version patch # 1.0.0 -> 1.0.1
12+
npm version minor # 1.0.0 -> 1.1.0
13+
npm version major # 1.0.0 -> 2.0.0
14+
```
15+
16+
2. **Update CHANGELOG.md** (if you have one):
17+
- Document new features
18+
- Document bug fixes
19+
- Document breaking changes
20+
21+
3. **Ensure all tests pass:**
22+
```bash
23+
npm test
24+
```
25+
26+
4. **Commit changes:**
27+
```bash
28+
git add package.json package-lock.json
29+
git commit -m "chore: bump version to v1.0.0"
30+
```
31+
32+
### 2. Create and Push Tag
33+
34+
```bash
35+
# Create annotated tag
36+
git tag -a v1.0.0 -m "Release v1.0.0"
37+
38+
# Push tag to trigger release workflow
39+
git push origin v1.0.0
40+
```
41+
42+
**Important:** Always use semantic versioning (vMAJOR.MINOR.PATCH)
43+
44+
### 3. Automated Pipeline (GitHub Actions)
45+
46+
Once you push the tag, GitHub Actions automatically:
47+
48+
1.**Runs all tests** (`npm test`)
49+
2.**Generates coverage report** (`npm run test:coverage`)
50+
3.**Creates build artifact** (tar.gz with all necessary files)
51+
4.**Generates changelog** (from commits since last tag)
52+
5.**Creates DRAFT release** on GitHub
53+
54+
### 4. Review & Publish
55+
56+
1. Go to: https://github.com/YOUR_USERNAME/livck-discord-bot/releases
57+
2. Find the **draft release** created by the workflow
58+
3. **Review**:
59+
- Check changelog is correct
60+
- Verify artifact is attached
61+
- Test the artifact if needed
62+
4. **Edit if necessary**:
63+
- Add additional release notes
64+
- Highlight breaking changes
65+
- Add screenshots/demos
66+
5. **Publish the release** when ready
67+
68+
## 📋 Versioning Strategy
69+
70+
We follow [Semantic Versioning](https://semver.org/):
71+
72+
### MAJOR version (v2.0.0)
73+
Breaking changes:
74+
- Database schema changes requiring migration
75+
- Command structure changes
76+
- API breaking changes
77+
78+
### MINOR version (v1.1.0)
79+
New features (backwards compatible):
80+
- New commands
81+
- New layouts
82+
- New languages
83+
- New features
84+
85+
### PATCH version (v1.0.1)
86+
Bug fixes and improvements:
87+
- Bug fixes
88+
- Performance improvements
89+
- Documentation updates
90+
- Translation updates
91+
92+
## 🔍 Example Release Flow
93+
94+
```bash
95+
# 1. Work on feature branch
96+
git checkout -b feature/new-layout
97+
# ... make changes ...
98+
git commit -m "feat: add new layout option"
99+
git push origin feature/new-layout
100+
101+
# 2. Create PR and merge to main
102+
# ... PR is reviewed and merged ...
103+
104+
# 3. Update version on main branch
105+
git checkout main
106+
git pull origin main
107+
npm version minor # Creates commit + tag locally
108+
109+
# 4. Push to trigger release
110+
git push origin main
111+
git push origin v1.1.0 # Triggers GitHub Actions release workflow
112+
113+
# 5. Go to GitHub releases and review draft
114+
# 6. Publish when ready!
115+
```
116+
117+
## 🛠️ Release Checklist
118+
119+
Before creating a release:
120+
121+
- [ ] All tests passing locally (`npm test`)
122+
- [ ] Version bumped in `package.json`
123+
- [ ] CHANGELOG.md updated (if applicable)
124+
- [ ] README.md is up to date
125+
- [ ] No breaking changes without documentation
126+
- [ ] Crowdin translations synced (`npm run i18n:download`)
127+
- [ ] Git tag follows semantic versioning (vX.Y.Z)
128+
129+
## 🔒 Hotfix Releases
130+
131+
For critical bug fixes:
132+
133+
```bash
134+
# 1. Create hotfix branch from main
135+
git checkout -b hotfix/critical-bug main
136+
137+
# 2. Fix the bug
138+
git commit -m "fix: critical bug in status updates"
139+
140+
# 3. Bump patch version
141+
npm version patch
142+
143+
# 4. Merge to main and tag
144+
git checkout main
145+
git merge hotfix/critical-bug
146+
git push origin main
147+
148+
# 5. Push tag to trigger release
149+
git push origin v1.0.1
150+
```
151+
152+
## 🎯 Release Artifacts
153+
154+
Each release includes:
155+
156+
- **Source code** (zip & tar.gz)
157+
- **Build artifact** (tar.gz without node_modules, tests, .git)
158+
- **README.md** (setup instructions)
159+
- **LICENSE** (MIT License)
160+
- **CROWDIN_SETUP.md** (translation guide)
161+
162+
## 📊 GitHub Actions Workflow
163+
164+
The release workflow consists of 3 stages:
165+
166+
1. **Test** - Runs all tests, generates coverage
167+
2. **Build** - Creates distributable artifact
168+
3. **Release** - Creates draft release with changelog
169+
170+
All stages must pass before a draft release is created.
171+
172+
## 🚨 Troubleshooting
173+
174+
### Release workflow fails
175+
176+
1. Check GitHub Actions logs: https://github.com/YOUR_USERNAME/livck-discord-bot/actions
177+
2. Common issues:
178+
- Tests failing → Fix tests and re-tag
179+
- Permission issues → Check `GITHUB_TOKEN` permissions
180+
- Artifact size too large → Review included files
181+
182+
### Re-creating a release
183+
184+
```bash
185+
# Delete tag locally and remotely
186+
git tag -d v1.0.0
187+
git push origin :refs/tags/v1.0.0
188+
189+
# Delete draft release on GitHub (manually)
190+
# Fix issues, then re-create tag
191+
git tag -a v1.0.0 -m "Release v1.0.0"
192+
git push origin v1.0.0
193+
```
194+
195+
## 🎉 Post-Release
196+
197+
After publishing a release:
198+
199+
1. Announce in Discord community (discord.livck.com)
200+
2. Update documentation if needed
201+
3. Monitor for issues
202+
4. Respond to feedback
203+
204+
## 📚 Additional Resources
205+
206+
- [Semantic Versioning](https://semver.org/)
207+
- [GitHub Releases Documentation](https://docs.github.com/en/repositories/releasing-projects-on-github)
208+
- [Keep a Changelog](https://keepachangelog.com/)

0 commit comments

Comments
 (0)