Skip to content

Commit e2b902e

Browse files
committed
ci: add Release Please configuration and documentation
Add Release Please configuration files and documentation for automated version management and releases based on conventional commits. Changes: - Add Release Please manifest (.release-please-manifest.json) - Add Release Please config (release-please-config.json) - Add CHANGELOG.md for automated changelog tracking - Create comprehensive release process documentation - Update README with Release Please workflow instructions Note: Workflow files will be added in next commit (requires workflow permissions)
1 parent af07b70 commit e2b902e

File tree

5 files changed

+258
-4
lines changed

5 files changed

+258
-4
lines changed

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "1.5.5"
3+
}

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changelog
2+
3+
All notable changes to ClickIt will be documented in this file.
4+
5+
This changelog is automatically generated by [Release Please](https://github.com/googleapis/release-please) based on [Conventional Commits](https://www.conventionalcommits.org/).
6+
7+
## [1.5.5](https://github.com/jsonify/ClickIt/releases/tag/v1.5.5) (Current Version)
8+
9+
Initial changelog. Previous release history can be found in GitHub releases.

README.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,24 +178,44 @@ fastlane auto_beta
178178
```
179179

180180
#### **Production Release**
181+
182+
**NEW: Automated with Release Please**
181183
```bash
182-
# 1. Promote staging to main
183-
git checkout main && git merge staging
184+
# 1. Use conventional commits
185+
git commit -m "feat: add new feature" # Minor bump
186+
git commit -m "fix: correct bug" # Patch bump
187+
git commit -m "feat!: breaking change" # Major bump
188+
189+
# 2. Merge to main (via PR)
190+
# Release Please automatically:
191+
# - Creates a release PR with version bump
192+
# - Updates CHANGELOG.md
193+
# - Creates GitHub release when PR is merged
194+
# - Triggers build workflow
195+
196+
# See docs/RELEASE_PROCESS.md for details
197+
```
184198

185-
# 2. Automated release with version bumping
199+
**Legacy: Manual Release (Deprecated)**
200+
```bash
201+
# Old process - use Release Please instead
186202
fastlane bump_and_release bump:minor # 1.0.0 → 1.1.0
187203
```
188204

189205
### 📚 **Additional Documentation**
190206
- **[CLAUDE.md](CLAUDE.md)** - Development guidance and project overview
191207
- **[BUILD_AND_DEPLOY.md](BUILD_AND_DEPLOY.md)** - Manual build and deployment instructions
192208
- **[CERTIFICATE_SETUP.md](CERTIFICATE_SETUP.md)** - Code signing certificate setup
209+
- **[docs/RELEASE_PROCESS.md](docs/RELEASE_PROCESS.md)** - Automated release process with Release Please
193210

194211
## Contributing
195212

196213
Contributions are welcome! Please read our contributing guidelines and check the Issues tab for open tasks.
197214

198-
**Before contributing**: Read the [Git Workflow Guide](docs/git-workflow-guide.md) to understand our branch strategy and release process.
215+
**Before contributing**:
216+
- Read the [Git Workflow Guide](docs/git-workflow-guide.md) to understand our branch strategy
217+
- Use [Conventional Commits](https://www.conventionalcommits.org/) format for commit messages
218+
- See [Release Process](docs/RELEASE_PROCESS.md) for how releases are created
199219

200220
## License
201221

docs/RELEASE_PROCESS.md

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
# Release Process with Release Please
2+
3+
## Overview
4+
5+
ClickIt uses [Release Please](https://github.com/googleapis/release-please) to automate version management and releases. Release Please automatically:
6+
7+
- 📝 Generates changelogs based on conventional commits
8+
- 🔢 Bumps version numbers in `ClickIt/Info.plist`
9+
- 🏷️ Creates git tags
10+
- 📦 Creates GitHub releases
11+
- 🔄 Updates `CHANGELOG.md`
12+
13+
## How It Works
14+
15+
### 1. Conventional Commits
16+
17+
Use [Conventional Commits](https://www.conventionalcommits.org/) format for your commit messages:
18+
19+
```
20+
<type>(<scope>): <description>
21+
22+
[optional body]
23+
24+
[optional footer]
25+
```
26+
27+
**Types that trigger releases:**
28+
- `feat:` - New feature (bumps minor version)
29+
- `fix:` - Bug fix (bumps patch version)
30+
- `feat!:` or `fix!:` - Breaking change (bumps major version)
31+
- `perf:` - Performance improvement (bumps patch version)
32+
33+
**Other types (included in changelog but don't trigger releases):**
34+
- `docs:` - Documentation changes
35+
- `refactor:` - Code refactoring
36+
- `test:` - Test updates
37+
- `chore:` - Maintenance tasks
38+
- `ci:` - CI/CD changes
39+
- `build:` - Build system changes
40+
41+
**Examples:**
42+
```bash
43+
git commit -m "feat: add click interval presets"
44+
git commit -m "fix: correct emergency stop behavior"
45+
git commit -m "feat!: redesign UI with new navigation"
46+
git commit -m "perf: optimize click timing accuracy"
47+
```
48+
49+
### 2. Release Please Workflow
50+
51+
When you push commits to `main`:
52+
53+
1. **Release Please analyzes commits** since the last release
54+
2. **Creates/updates a Release PR** with:
55+
- Updated `CHANGELOG.md`
56+
- Bumped version in `ClickIt/Info.plist`
57+
- Updated `.release-please-manifest.json`
58+
3. **When you merge the Release PR:**
59+
- Creates a git tag (e.g., `v1.6.0`)
60+
- Creates a GitHub release with changelog
61+
- Triggers the build workflow to attach binaries
62+
63+
### 3. Build Workflow
64+
65+
The build workflow (`.github/workflows/release.yml`):
66+
67+
1. Triggered by the tag created by Release Please
68+
2. Builds the universal macOS app bundle
69+
3. Creates `.zip` archive
70+
4. Uploads artifacts to the GitHub release
71+
72+
## Creating a Release
73+
74+
### Standard Release (Recommended)
75+
76+
1. **Make changes using conventional commits:**
77+
```bash
78+
git checkout -b feature/new-feature
79+
# Make changes
80+
git commit -m "feat: add new click pattern"
81+
git push origin feature/new-feature
82+
```
83+
84+
2. **Create and merge PR to main:**
85+
- Open PR on GitHub
86+
- Get code review
87+
- Merge to `main`
88+
89+
3. **Release Please creates a Release PR:**
90+
- Automatically created after merge to `main`
91+
- Reviews version bump and changelog
92+
- Title: "chore(main): release X.Y.Z"
93+
94+
4. **Review and merge the Release PR:**
95+
- Check the version bump is correct
96+
- Review the generated changelog
97+
- Merge when ready to release
98+
99+
5. **Automated release process:**
100+
- Tag created automatically
101+
- GitHub release created with changelog
102+
- Build workflow triggered
103+
- Binaries uploaded to release
104+
105+
### Manual Release (Emergency)
106+
107+
If you need to create a release manually:
108+
109+
1. **Update version in Info.plist:**
110+
```bash
111+
/usr/libexec/PlistBuddy -c "Set CFBundleShortVersionString 1.6.0" ClickIt/Info.plist
112+
```
113+
114+
2. **Update manifest:**
115+
```bash
116+
echo '{ ".": "1.6.0" }' > .release-please-manifest.json
117+
```
118+
119+
3. **Commit and tag:**
120+
```bash
121+
git add ClickIt/Info.plist .release-please-manifest.json CHANGELOG.md
122+
git commit -m "chore: release 1.6.0"
123+
git tag v1.6.0
124+
git push origin main
125+
git push origin v1.6.0
126+
```
127+
128+
## Version Bumping Rules
129+
130+
Release Please determines version bumps based on commit types:
131+
132+
| Commit Type | Version Bump | Example |
133+
|------------|--------------|---------|
134+
| `fix:` | Patch (1.5.5 → 1.5.6) | Bug fixes |
135+
| `feat:` | Minor (1.5.5 → 1.6.0) | New features |
136+
| `feat!:` or `fix!:` | Major (1.5.5 → 2.0.0) | Breaking changes |
137+
| `perf:` | Patch (1.5.5 → 1.5.6) | Performance |
138+
139+
**Breaking Changes:**
140+
- Add `!` after type: `feat!:` or `fix!:`
141+
- Or add `BREAKING CHANGE:` in commit footer
142+
143+
## Beta Releases
144+
145+
Beta releases still use the manual tag approach:
146+
147+
```bash
148+
git tag beta-v1.6.0-20250111
149+
git push origin beta-v1.6.0-20250111
150+
```
151+
152+
Beta releases trigger the `beta_release` job in `cicd.yml`.
153+
154+
## Configuration Files
155+
156+
- `.release-please-manifest.json` - Current version tracking
157+
- `release-please-config.json` - Release Please configuration
158+
- `CHANGELOG.md` - Auto-generated changelog
159+
- `ClickIt/Info.plist` - Version source of truth
160+
161+
## Troubleshooting
162+
163+
### Release PR not created
164+
165+
- Check that commits follow conventional commit format
166+
- Ensure commits were pushed to `main` branch
167+
- Check GitHub Actions logs for release-please workflow
168+
169+
### Wrong version bump
170+
171+
- Review commit messages for types
172+
- Breaking changes need `!` or `BREAKING CHANGE:` footer
173+
- Manually edit the Release PR if needed
174+
175+
### Build failed
176+
177+
- Check release workflow logs in GitHub Actions
178+
- Verify Xcode version compatibility
179+
- Check build script: `build_app_unified.sh`
180+
181+
## Migration from Manual Releases
182+
183+
The old manual process (`scripts/update-version.sh`) is deprecated but still available for emergencies. The new process is:
184+
185+
**Old:** Manual script → Manual tag → Release workflow
186+
**New:** Conventional commits → Release Please PR → Auto tag → Release workflow
187+
188+
## Resources
189+
190+
- [Release Please Documentation](https://github.com/googleapis/release-please)
191+
- [Conventional Commits Specification](https://www.conventionalcommits.org/)
192+
- [Semantic Versioning](https://semver.org/)

release-please-config.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"release-type": "simple",
3+
"packages": {
4+
".": {
5+
"release-type": "simple",
6+
"bump-minor-pre-major": true,
7+
"bump-patch-for-minor-pre-major": false,
8+
"changelog-sections": [
9+
{ "type": "feat", "section": "Features", "hidden": false },
10+
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
11+
{ "type": "perf", "section": "Performance Improvements", "hidden": false },
12+
{ "type": "revert", "section": "Reverts", "hidden": false },
13+
{ "type": "docs", "section": "Documentation", "hidden": false },
14+
{ "type": "style", "section": "Styles", "hidden": true },
15+
{ "type": "chore", "section": "Miscellaneous", "hidden": true },
16+
{ "type": "refactor", "section": "Code Refactoring", "hidden": false },
17+
{ "type": "test", "section": "Tests", "hidden": true },
18+
{ "type": "build", "section": "Build System", "hidden": true },
19+
{ "type": "ci", "section": "Continuous Integration", "hidden": true }
20+
],
21+
"extra-files": [
22+
{
23+
"type": "xml",
24+
"path": "ClickIt/Info.plist",
25+
"xpath": "/plist/dict/key[text()='CFBundleShortVersionString']/following-sibling::string[1]"
26+
}
27+
]
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)