mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-29 21:03:40 +00:00
Implemented multi-backend release notes generation: **Scripts:** - prepare-release: Bump manifest.json + create tag (foolproof workflow) - generate-release-notes: Parse conventional commits with 3 backends * GitHub Copilot CLI (AI-powered, smart grouping) * git-cliff (template-based, fast and reliable) * Manual grep/awk (fallback, always works) - setup: Auto-install git-cliff via cargo in DevContainer **GitHub Actions:** - auto-tag.yml: Automatically create tag on manifest.json version bump - release.yml: Generate release notes and create GitHub release on tag push - release.yml: Button config for GitHub UI release notes generator **Configuration:** - cliff.toml: Smart filtering rules * Excludes: manifest bumps, dev-env changes, CI/CD changes * Includes: Dependency updates (relevant for users) * Groups by conventional commit type with emoji **Workflow:** 1. Run `./scripts/prepare-release 0.3.0` 2. Push commit + tag: `git push origin main v0.3.0` 3. CI/CD automatically generates release notes and creates GitHub release Impact: Maintainers can prepare professional releases with one command. Release notes are automatically generated from conventional commits with intelligent filtering and categorization.
54 lines
2.2 KiB
TOML
54 lines
2.2 KiB
TOML
# Configuration for git-cliff
|
|
# See: https://git-cliff.org/docs/configuration
|
|
|
|
[changelog]
|
|
# Template for the changelog body
|
|
header = ""
|
|
body = """
|
|
{% for group, commits in commits | group_by(attribute="group") %}
|
|
### {{ group | striptags | trim | upper_first }}
|
|
{% for commit in commits %}
|
|
- {% if commit.scope %}**{{ commit.scope }}**: {% endif %}{{ commit.message | upper_first }}\
|
|
{% if commit.breaking %} [**BREAKING**]{% endif %} \
|
|
([{{ commit.id | truncate(length=7, end="") }}](https://github.com/jpawlowski/hass.tibber_prices/commit/{{ commit.id }}))
|
|
{% endfor %}
|
|
{% endfor %}
|
|
"""
|
|
trim = true
|
|
|
|
[git]
|
|
# Parse conventional commits
|
|
conventional_commits = true
|
|
# Include all commits (even non-conventional)
|
|
filter_unconventional = false
|
|
split_commits = false
|
|
|
|
# Commit parsers - map commit types to categories
|
|
commit_parsers = [
|
|
# Skip manifest.json version bumps (release housekeeping)
|
|
{ message = "^chore\\(release\\): bump version", skip = true },
|
|
# Skip development environment changes (not user-relevant)
|
|
{ message = "^(feat|fix|chore|refactor)\\((devcontainer|vscode|scripts|dev-env|environment)\\):", skip = true },
|
|
# Skip CI/CD infrastructure changes (not user-relevant)
|
|
{ message = "^(feat|fix|chore|ci)\\((ci|workflow|actions|github-actions)\\):", skip = true },
|
|
# Keep dependency updates - these ARE relevant for users
|
|
{ message = "^chore\\(deps\\):", group = "📦 Dependencies" },
|
|
# Regular commit types
|
|
{ message = "^feat", group = "🎉 New Features" },
|
|
{ message = "^fix", group = "🐛 Bug Fixes" },
|
|
{ message = "^docs?", group = "📚 Documentation" },
|
|
{ message = "^perf", group = "⚡ Performance" },
|
|
{ message = "^refactor", group = "🔧 Maintenance & Refactoring" },
|
|
{ message = "^style", group = "🎨 Styling" },
|
|
{ message = "^test", group = "🧪 Testing" },
|
|
{ message = "^chore", group = "🔧 Maintenance & Refactoring" },
|
|
{ message = "^build", group = "📦 Build" },
|
|
]
|
|
|
|
# Protect breaking changes
|
|
commit_preprocessors = [
|
|
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/jpawlowski/hass.tibber_prices/issues/${2}))" },
|
|
]
|
|
|
|
# Filter out commits
|
|
filter_commits = false
|