Overview
ZeroStarter uses an automated release workflow that manages versioning, changelog generation, and GitHub releases. The workflow operates withcanary (development) and main (production) branches, automatically creating draft PRs for review.
Prerequisites
Workflow
This project uses an automated release workflow withcanary (development) and main (production) branches. All PRs are created as drafts for manual review.
name: auto-canary-into-main
on:
push:
branches: ["canary"]
workflow_dispatch:
jobs:
auto-canary-into-main:
name: Auto create PR to merge canary into main
runs-on: ubuntu-latest
steps:
- name: Create Pull Request
run: |
curl -sL -X POST \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-d "{\"title\": \"ci(release): 🚀 merge canary into main\", \"head\": \"canary\", \"base\": \"main\", \"draft\": true}"
CHANGELOG.md using changelogen --bumppackage.jsonci(changelog): update changelog and bump version- name: Update changelog branch from main
run: |
git checkout main
git branch -D changelog 2>/dev/null || true
git checkout -b changelog
bunx changelogen --bump --no-commit || true
bunx oxfmt --write CHANGELOG.md
bun install --ignore-scripts
git add CHANGELOG.md package.json
git commit -m "ci(changelog): update changelog and bump version"
git push origin changelog --force
Build Checks
auto-check-build.yml runs on pushes to canary and PR updates, executing lint, build, and type checks.
.github/workflows/auto-check-build.yml
Changelog Generation
changelogen generates CHANGELOG.md with categorized changes, commit links, and contributors.
Changelog Format
Commit Categories
Based on conventional commits:| Prefix | Category | Icon |
|---|---|---|
feat | Features | ✨ |
fix | Bug Fixes | 🐛 |
docs | Documentation | 📖 |
style | Styles | 💄 |
refactor | Code Refactoring | ♻️ |
perf | Performance | ⚡ |
test | Tests | ✅ |
chore | Chores | 🏡 |
ci | CI | 🤖 |
GitHub Releases
When creating a GitHub release:Manual Operations
Manual Changelog Generation
Manual Version Bump
Troubleshooting
Workflow not creating PRs
Workflow not creating PRs
Check GitHub Actions permissions:
- Go to Settings → Actions → General
- Ensure “Allow GitHub Actions to create and approve pull requests” is enabled
- Check workflow logs for errors
Changelog not generating
Changelog not generating
Verify changelogen configuration:
- Check
changelog.config.tsexists and is valid - Ensure commits follow conventional commit format
- Run
bunx changelogen --bumpmanually to test
Version not bumping
Version not bumping
Check package.json:
- Ensure
package.jsonhas a valid version field - Verify the changelog workflow has write permissions
- Check workflow logs for errors during version bump
Best Practices
- Use conventional commits: Follow the commit message convention for automatic categorization
- Review draft PRs: Always review automated PRs before merging
- Keep changelogs clean: Format changelog with
oxfmtfor consistency - Tag releases: Create Git tags matching package.json versions
- Document breaking changes: Use
!suffix for breaking changes (e.g.,feat!:)