hass.tibber_prices/scripts/setup
Julian Pawlowski e08fd60070 feat(release): add automated release notes generation system
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.
2025-11-09 14:25:15 +00:00

28 lines
914 B
Bash
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
# script/setup: Setup script used by DevContainers to prepare the project
set -e
cd "$(dirname "$0")/.."
# Install optional release note backend: GitHub Copilot CLI (AI-powered)
if command -v npm >/dev/null 2>&1; then
echo "==> Installing GitHub Copilot CLI for AI-powered release notes..."
npm install -g @github/copilot 2>/dev/null || {
echo " ⚠️ Warning: GitHub Copilot CLI installation failed (optional)"
echo " You can install it manually: npm install -g @github/copilot"
}
fi
# Install optional release note backend: git-cliff (template-based)
if command -v cargo >/dev/null 2>&1; then
echo "==> Installing git-cliff for template-based release notes..."
cargo install git-cliff || {
echo " ⚠️ Warning: git-cliff installation failed (optional)"
}
fi
scripts/bootstrap
echo "==> Project is now ready to go!"