This document describes the automated workflows configured for RainingKeysPython.
Trigger: Tag push starting with v* or manual workflow dispatch
Purpose: Automatically creates GitHub releases using git-cliff for changelog generation
Features:
- ✅ Extracts version from git tag
- ✅ Uses git-cliff to generate changelog automatically
- ✅ Supports existing
CHANGELOG_{VERSION}.mdfiles (can override) - ✅ Creates GitHub release with formatted notes
- ✅ Uploads build artifacts:
RainingKeysPython.zip(Release build)RainingKeysPython-debug.zip(Debug build)CHANGELOG_{VERSION}.md(Changelog file)
- ✅ Commits generated changelog to repository
Changelog Generation:
- Uses git-cliff for automated changelog
- Configured via
cliff.tomlin repository root - Generates changelog from conventional commits
- Supports commit types:
feat,fix,perf,refactor,chore,test,docs,style - Follows Conventional Commits format
Manual Trigger:
gh workflow run release.yml -f version=1.5.0
# With existing changelog
gh workflow run release.yml -f version=1.5.0 -f use_existing_changelog=trueAutomatic Trigger:
# Tag version
git tag v1.5.0
git push origin v1.5.0
# Release workflow runs automaticallyPermissions Required:
contents: write- To create releases, upload artifacts, and commit changelogs
Trigger: Push to main/master/develop branches or Pull Requests
Purpose: Comprehensive code quality validation
Jobs:
- Compiles all Python files to validate syntax
- Checks
main.py,core/*.py,core/ui/*.py - Fails build if syntax errors found
- Runs
pyflakeson all Python files - Detects unused imports and undefined variables
- Checks basic code quality issues
- Tests all module imports
- Validates import order and dependencies
- Checks for circular imports
- Validates AST (Abstract Syntax Tree) for all files
- Ensures type hints are valid
- Checks for syntax-level type errors
- Tests default configuration creation
- Validates schema checking
- Tests config save/load operations
- Tests temporary config file handling
- Tests PyInstaller build on Windows runner
- Validates build process
- Ensures executable is created
Failure Behavior: Any job failure will fail the entire workflow, preventing merge of problematic code.
Purpose: Configuration for git-cliff changelog generator
Key Settings:
[changelog]
header = "# Changelog - {{ version }} [{{ date | date(format='%Y-%m-%d') }}]"
body = """
{{ range .patches }}
## {{ .Commit.Title }}
{{ range .commits }}
### {{ .Commit.Header }}
{{ .Commit.Body }}
{{ end }}
{{ end }}
"""
footer = "Full Changelog: [CHANGELOG_{{ version }}.md](link)"[git.conventional_commits]
types = ["feat", "fix", "perf", "refactor", "chore", "test", "docs", "style"]
scope_enhancement = ["feat"]
scope_bug = ["fix"]
scope_performance = ["perf"]
scope_refactor = ["refactor"]
scope_breaking = ["BREAKING CHANGE"][git]
conventional_commits = true
sort = "date"
git_tag_pattern = "v*"- ✅ Conventional commits support
- ✅ Customizable templates
- ✅ Multiple commit type categories
- ✅ Sort by date (chronological)
- ✅ Footer with release notes
- ✅ Automatic version detection
For detailed git-cliff configuration:
Option 1: Automatic with Git-Cliff (Recommended)
- Make conventional commits:
git commit -m "feat: Add new feature" git commit -m "fix: Resolve bug in input handler"
- Push to main branch
- Create and push git tag:
git tag v1.5.0 git push origin v1.5.0
- Release workflow runs automatically
- Git-cliff generates changelog from commits
- Release appears on GitHub with generated notes
- Generated changelog is committed to repository
Option 2: With Existing Changelog
- Create
CHANGELOG_{VERSION}.mdmanually - Create and push git tag
- Run workflow with
use_existing_changelog=true:gh workflow run release.yml -f version=1.5.0 -f use_existing_changelog=true
Option 3: Manual Release
- Update
CHANGELOG_{VERSION}.mdmanually - Create and push git tag:
git tag v1.5.0 git push origin v1.5.0
- Go to Actions tab
- Select "Create Release" workflow
- Click "Run workflow"
- Enter version:
1.5.0
Workflows run automatically on every push and PR:
- Go to Actions tab in GitHub
- Select "Code Quality" workflow
- View results for each job:
- ✅ Syntax Check
- ✅ Linting
- ✅ Import Validation
- ✅ Type Checking
- ✅ Config Validation
- ✅ Windows Build Test
- Fix any issues found
- Push fixes and workflow will re-run
No separate changelog workflow! Git-cliff is integrated into release workflow.
- Go to Actions tab
- Select "Create Release" workflow
- View changelog generation results
Git-cliff works best with Conventional Commits.
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
feat: A new featurefix: A bug fixperf: A code change that improves performancerefactor: A code change that neither fixes a bug nor adds a featurechore: Changes to the build process or auxiliary tools/librariestest: Adding missing tests or correcting existing testsdocs: Documentation only changesstyle: Code style changes (formatting, semi-colons, etc)
# Feature addition
git commit -m "feat(input): Add keyboard shortcut configuration"
# Bug fix
git commit -m "fix(overlay): Resolve font caching issue"
# Performance improvement
git commit -m "perf(rendering): Optimize paint event"
# Refactoring
git commit -m "refactor(config): Simplify configuration loading"
# Documentation
git commit -m "docs(readme): Update installation instructions"
# Breaking change
git commit -m "feat!: Change configuration file format"
# With body
git commit -m "fix(input): Handle multiple key presses
Previously, only the last key was registered.
Now, all concurrent key presses are captured."Check:
- Token is configured as
GITHUB_TOKENsecret - Workflow YAML syntax is valid
- Push was to correct branch (
main, notmain) - Tag format is correct (
vX.Y.Z)
Issue: Changelog doesn't generate properly
Causes:
- Not using conventional commit format
- Missing
cliff.tomlconfiguration file - No commits since last tag
Solutions:
- Use conventional commit format (see above guide)
- Ensure
cliff.tomlis in repository root - Check commit messages for valid types
- Verify git history is available
Issue: CI workflow failing
Common Causes:
- Python syntax errors
- Linting errors (pyflakes)
- Import failures
- Type annotation issues
Solutions:
- Check Actions tab for detailed error logs
- Run checks locally:
python -m py_compile *.py core/*.py python -m pyflakes *.py core/*.py
- Fix issues and push
- Workflow will pass on next run
For automated workflows to work, you need to configure:
GITHUB_TOKEN
- Used for: Creating releases, uploading artifacts, committing changes
- Source: Repository Settings → Secrets and variables → Actions
- Permission:
contents: write(for releases, commits, and artifact uploads)
Setup:
- Go to your repository on GitHub
- Click Settings → Secrets and variables → Actions
- Click "New repository secret"
- Name:
GITHUB_TOKEN - Value: Your personal access token with
repo,workflowscopes - Click "Add secret"

[]Replace ianaw/RainingKeysPython with your actual repository path.
- ✅ No manual changelog maintenance
- ✅ Always reflects actual commits
- ✅ Prevents missing entries
- ✅ Reduces human error
- ✅ Uniform format across all releases
- ✅ Conventional commits structure
- ✅ Professional presentation
- ✅ Customizable templates
- ✅ Support for multiple commit types
- ✅ Can be overridden with manual changelog
- ✅ Configurable sorting and filtering
- Old: Separate
changelog.ymlworkflow for version bumping - New: Git-cliff integration in
release.ymlworkflow
- Automated: No need to manually write changelog entries
- Accurate: Based on actual commit history
- Flexible: Uses conventional commits for structured data
- Professional: Standardized changelog format
- No action required! Just make conventional commits.
- Chelogs generate automatically on release.
- Use conventional commit format
- Configure
cliff.tomlfor custom templates - Override with manual
CHANGELOG_{VERSION}.mdif needed
-
Use Conventional Commits
- Follow the commit format guide above
- Use appropriate commit types
- Include descriptive messages
- Add scope for better organization
-
Tag Correctly
- Always use format:
v{MAJOR}.{MINOR}.{PATCH} - Example:
v1.4.0 - Tags trigger automated release workflow
- Always use format:
-
Test Build Locally
- Run
python build.pybefore pushing tag - Verify both release and debug builds work
- Check artifacts are generated correctly
- Run
-
Review Generated Changelogs
- Git-cliff generates changelog automatically
- Can be overridden with manual
CHANGELOG_{VERSION}.md - Add detailed release notes if needed
-
Conventional Commits
- Follow the commit format guide
- Use appropriate types for changes
- Be descriptive in commit messages
-
Run Tests Locally
- Ensure all tests pass before pushing
- Check for syntax errors with
py_compile - Run linting tools locally
-
Monitor CI Results
- Check Actions tab after pushing
- Fix any code quality issues immediately
- Don't merge PRs with failing workflows
Artifacts: None (validation only)
Artifacts:
RainingKeysPython.zip- Release buildRainingKeysPython-debug.zip- Debug buildCHANGELOG_{VERSION}.md- Changelog file (generated or manual)CHANGELOG.md- Git-cliff generated changelogrelease_notes.md- Formatted release notes for GitHub
Retention: 30 days
To modify workflows:
- Edit
.github/workflows/*.ymlfiles - Commit changes
- Push to repository
- Workflows update automatically
To modify changelog generation:
- Edit
cliff.tomlin repository root - Modify templates or settings
- Commit and push
- Changes apply on next release
- Create new
.github/workflows/{name}.ymlfile - Follow existing workflow patterns
- Test workflow manually via Actions tab
- Commit and push
- ✅ Use repository secrets (never commit tokens)
- ✅ Limit token scopes to minimum required
- ✅ Set token expiration dates
- ✅ Rotate tokens periodically
- ✅ Use official GitHub Actions from verified publishers
- ✅ Pin action versions (
@v4) - ✅ Review action permissions
- ✅ Enable branch protection rules
For issues specific to RainingKeysPython workflows:
- Check Workflow Logs: Actions tab → Select workflow → View logs
- Review Workflow Files:
.github/workflows/*.yml,cliff.toml - Report Issues: Create issue with label
github-actions
# Trigger release manually
gh workflow run release.yml -f version=1.5.0
# Trigger release with existing changelog
gh workflow run release.yml -f version=1.5.0 -f use_existing_changelog=true
# View workflow runs
gh run list --workflow=release
# Check workflow status
gh workflow view release
# Cancel running workflow
gh run cancel <run-id>.github/
└── workflows/
├── release.yml # 🚀 Automated GitHub releases (with git-cliff)
├── ci.yml # ✅ Code quality checks
└── cliff.toml # 📝 Git-cliff configuration
For detailed documentation on workflows and setup:
- .github/README.md - Workflow directory reference
- GITHUB_SETUP.md - Setup guide with troubleshooting
- cliff.toml - Git-cliff configuration
✅ 2 automated workflows configured (release, CI) ✅ Git-cliff integrated for automatic changelog generation ✅ Code quality validation on every push ✅ Automated releases with conventional commit parsing ✅ Comprehensive documentation created
Your repository now has a professional CI/CD pipeline with automated changelogs! 🎉
After setting up workflows:
- Configure Token: Set up
GITHUB_TOKENsecret following instructions above - Review cliff.toml: Customize changelog templates if needed
- Start Using Conventional Commits: Format commit messages properly
- Test Release Process:
- Make small change with conventional commit
- Push to main branch
- Create and push tag
- Verify release appears correctly
- Monitor CI: Check code quality results regularly
- Add Badges: Update README.md with workflow status badges