OpenLeague uses GitHub Actions to automate the entire release lifecycle, from version management to deployment.
Commit with conventional format and merge to main:
git commit -m "feat: add new roster export feature"
git push origin mainResult: Automatic minor version bump (e.g., 0.1.0 → 0.2.0)
# Option 1: Workflow dispatch with specific version
gh workflow run release.yml -f version=1.2.3
# Option 2: Create and push tag
git tag -a v1.2.3 -m "Release v1.2.3"
git push origin v1.2.3git checkout -b hotfix/critical-bug
git commit -m "fix: resolve critical security issue"
git push origin hotfix/critical-bug
gh pr create --base main
gh pr merge --merge # Auto-release triggers on merge| Commit Type | Example | Version Bump |
|---|---|---|
feat: |
feat: add CSV export |
Minor (0.X.0) |
fix: |
fix: resolve RSVP bug |
Patch (0.0.X) |
feat!: |
feat!: redesign API |
Major (X.0.0) |
docs: |
docs: update README |
No bump |
chore: |
chore: update deps |
No bump |
File: .github/workflows/release.yml
Process:
- Triggered on push to
mainor manual dispatch - Runs quality checks (type-check, lint, build)
- Analyzes commits since last release
- Determines semantic version bump
- Updates
package.json - Commits version change
[skip ci] - Creates Git tag
- Generates categorized changelog
- Creates GitHub release
- Notifies success
Skip Release: Include [skip ci] in commit message
File: .github/workflows/tag-release.yml
Process:
- Triggered by pushing tag matching
v*.*.* - Validates semantic versioning format
- Runs quality checks
- Generates release notes from commits
- Creates GitHub release
- Marks as pre-release if tag contains
-(e.g.,v1.0.0-beta.1)
File: .github/workflows/version-check.yml
Process:
- Triggered on PR to
mainmodifyingpackage.json - Compares PR version with base branch version
- Validates version bump is valid and incremental
- Posts comment on PR with analysis:
- 🟢 Valid patch bump
- 🟡 Valid minor bump
- 🔴 Valid major bump
⚠️ Version unchanged- ❌ Invalid version bump (fails CI)
Defined in .github/release.yml:
- 🚨 Breaking Changes (
breaking-change,breaking) - ✨ New Features (
feature,enhancement,feat) - 🐛 Bug Fixes (
bug,fix,bugfix) - 📚 Documentation (
documentation,docs) - 🏗️ Infrastructure (
infrastructure,ci,cd) - 🔧 Configuration (
configuration,config) - 🎨 Styling (
style,styling,ui,ux) - ⚡ Performance (
performance,optimization) - 🔒 Security (
security,vulnerability) - 🧪 Testing (
test,testing) - 📦 Dependencies (
dependencies,deps) - 🔄 Other Changes (everything else)
- PRs labeled:
ignore-for-release,skip-changelog,dependencies - Commits by:
dependabot,github-actions[bot]
All workflows use GITHUB_TOKEN with:
contents: write- Create tags and releasespull-requests: write- Comment on PRsissues: write- Update issues in releases
These are automatically provided by GitHub Actions.
- Use conventional commit format
- Let automation handle version bumps
- Review version-check comments on PRs
- Use
[skip ci]for documentation-only changes - Create pre-release tags for beta versions (
v1.0.0-beta.1)
- Don't manually edit version in package.json on
main - Don't create duplicate tags
- Don't skip CI checks
- Don't force push to
main - Don't create releases without testing
# List all releases
gh release list
# View specific release
gh release view v1.2.3
# Download release artifacts
gh release download v1.2.3# List workflow runs
gh run list --workflow=release.yml
# View specific run
gh run view <run-id>
# Watch latest run
gh run watch# Current package.json version
cat package.json | grep '"version"'
# Latest Git tag
git describe --tags --abbrev=0
# Latest GitHub release
gh release view --json tagNameCheck:
# View recent commits
git log --oneline -5
# Check for [skip ci]
git log --grep="\[skip ci\]" -5
# Verify push to main
git log origin/main -5View logs:
gh run list --workflow=release.yml --limit 1
gh run view <failed-run-id>Common fixes:
- Fix type errors:
bun run type-check - Fix lint errors:
bun run lint - Fix build errors:
bun run build
Resolution:
# Delete local and remote tag
git tag -d v1.2.3
git push origin :refs/tags/v1.2.3
# Fix version in package.json
# Recommit and re-release# Work on feature
git checkout -b feat/csv-export
git commit -m "feat: add roster CSV export"
git commit -m "test: add export tests"
# Merge to main
git checkout main
git merge feat/csv-export
git push
# Result: v0.1.0 → v0.2.0 (minor bump)# Fix critical bug
git checkout -b hotfix/rsvp-crash
git commit -m "fix: prevent RSVP null pointer exception"
# Merge to main
git checkout main
git merge hotfix/rsvp-crash
git push
# Result: v0.2.0 → v0.2.1 (patch bump)# Major refactor
git checkout -b refactor/auth-system
git commit -m "feat!: redesign authentication
BREAKING CHANGE: Old auth tokens no longer valid.
Users must re-authenticate after upgrade."
# Merge to main
git checkout main
git merge refactor/auth-system
git push
# Result: v0.2.1 → v1.0.0 (major bump)- Semantic Versioning Specification
- Conventional Commits
- GitHub Actions Documentation
- Release Template
- Contributing Guide
If you encounter issues with the release automation:
- Check Troubleshooting section
- Review workflow logs
- Open an issue with the
cilabel - Contact maintainers
Note: This automation is designed to be zero-touch for contributors. Just write good commit messages and merge to main! 🚀