This document describes the process for creating a new release of Home Assistant Sentry.
Starting from version 1.3.04, version numbers in configuration files are automatically incremented on every commit to the main branch.
When code is pushed to the main branch (including when a Pull Request is merged):
- A GitHub Actions workflow (
.github/workflows/update-version.yml) automatically triggers - First, it syncs version between config files if they're out of sync (config.yaml matches config.json)
- Then it reads the current version from
ha_sentry/config.json - It automatically increments the patch version by 1 (preserving 2-character formatting when present)
- It updates the version in both configuration files:
ha_sentry/config.jsonha_sentry/config.yaml
- It generates a meaningful CHANGELOG.md entry using a smart three-tier approach:
- First priority: Extracts Copilot PR review summary (from "## Pull request overview" section)
- Second priority: Uses PR title and body summary if available
- Third priority: Falls back to commit message(s) that triggered this version bump
- For single commits: Uses the commit message directly
- For batch merges (2-5 commits): Includes all commit messages
- For large batches (6+ commits): Uses the most recent commit message
- The changes are committed and pushed back to the
mainbranch - The workflow includes safeguards to prevent infinite loops (skips if commit is from the bot or is version-related)
The workflow automatically increments the patch version (smallest digit) on every push to main:
- Automatic increment:
+1for every commit to main- Example:
1.3.04→1.3.05→1.3.06→1.3.07 - Example:
1.3.09→1.3.10→1.3.11 - Example:
2.5.99→2.5.100→2.5.101
- Example:
- Format preservation: 2-character formatting is preserved (e.g.,
04→05, not5)
If config.json and config.yaml ever get out of sync:
- The workflow automatically syncs config.yaml to match config.json before incrementing
- This ensures both files always have the same version
- The sync happens in the same commit as the version increment
If you need to manually set a specific version (e.g., for a minor or major version bump):
- Edit
ha_sentry/config.jsonto the desired version - Edit
ha_sentry/config.yamlto match - Commit and push to main
- The next automatic commit will increment from your new base version
Important Notes:
- The workflow automatically skips if the commit author is
github-actions[bot]to prevent infinite loops - The workflow also skips if the commit message starts with version-related prefixes (e.g., "chore: auto-increment version", "chore: sync config.yaml version")
- The workflow ignores changes to
.github/workflows/**files - Both config files are automatically synced and kept in sync
- Version format with 2-character numbers (e.g.,
1.3.04) is preserved throughout increments
Since versions are automatically incremented on every commit, creating a release is simplified:
-
CHANGELOG.md is automatically updated
- The workflow automatically generates changelog entries using a smart three-tier approach:
- Copilot PR review summary (highest priority) - Extracts detailed summary from Copilot's PR review
- PR title and body (fallback) - Uses PR title and description when review isn't available
- Commit messages (last resort) - Uses commit messages if PR info isn't accessible
- For batch merges (2-5 commits), all commit messages are included
- For single commits or large batches, only the most recent commit message is used
- You can manually edit ha_sentry/CHANGELOG.md to refine or enhance the auto-generated entries
- Follow Home Assistant Add-on changelog format
- Example:
## 1.2.0(version number only, no date) - Use simple bullet points for changes (no need for subsections like "Added", "Changed", though they are acceptable)
- Important: Do not add dates or other suffixes to version headings
- Tip: Write clear, descriptive PR descriptions and commit messages as they may appear in the CHANGELOG
- The workflow automatically generates changelog entries using a smart three-tier approach:
-
Create a Git Tag (optional, for marking specific releases)
git tag -a v1.2.0 -m "Release version 1.2.0" git push origin v1.2.0 -
Create the GitHub Release (optional, for publishing release notes)
- Go to the repository on GitHub
- Click "Releases" → "Draft a new release"
- Choose an existing tag or create a new one (e.g.,
v1.2.0) - Add a title (e.g., "Version 1.2.0")
- Copy release notes from CHANGELOG.md
- Click "Publish release"
Note: Version numbers are automatically managed by commits to main. Tags and GitHub releases are optional and primarily used for documentation and user communication.
- Use semantic versioning:
MAJOR.MINOR.PATCH - Tags should be prefixed with
v(e.g.,v1.2.0) - The workflow automatically strips the
vprefix when updating config files
If you need to manually adjust the version (e.g., for a minor or major version bump):
-
Edit
ha_sentry/config.json:"version": "1.2.0"
-
Edit
ha_sentry/config.yaml:version: "1.2.0"
-
Commit the changes:
git add ha_sentry/config.json ha_sentry/config.yaml git commit -m "chore: bump version to 1.2.0" git push -
The next automatic commit to main will increment from this new base version.
Note: To skip auto-increment on a specific commit, you cannot prevent it. However, you can always manually adjust the version in a subsequent commit if needed.
Since commit messages and PR descriptions may be automatically included in the CHANGELOG, follow these best practices:
When Copilot creates a PR, it automatically generates a detailed review summary. You can also manually write PR descriptions:
- Include a clear summary: The first paragraph or "## Summary" section should concisely explain the changes
- Be user-focused: Describe what changed from a user's perspective, not implementation details
- Use structured sections: Use
## Summary,## Overview, or similar headings for better parsing
Good PR description example:
## Summary
This PR fixes a critical issue where the WebUI would hang for 60 seconds when the dependency graph completed with zero integrations. The fix corrects the status endpoint logic and adds directory mappings.
## Changes
- Fixed status endpoint to return proper error state
- Enhanced JavaScript retry logic
- Added directory mappings in config.yaml- Be descriptive: Write clear, user-friendly commit messages that explain what changed and why
- Use conventional commit format (optional but recommended):
feat: Add new dashboard feature- New featuresfix: Resolve issue with sensor updates- Bug fixesdocs: Update configuration examples- Documentation changesrefactor: Improve dependency analysis performance- Code improvementschore: Update dependencies- Maintenance tasks
- Focus on what, not how: Describe the change from a user's perspective
- Be concise but complete: One-line messages are fine if they're clear
- Avoid vague messages: Instead of "Fix bug", write "Fix issue with HACS integration detection"
Good examples:
feat: Add support for auto-update configurationfix: Resolve dashboard creation failure on startupdocs: Add troubleshooting guide for AI providers
Poor examples:
Update files(too vague)WIP(not descriptive)Fix(what was fixed?)
Remember: Your PR description or commit message may appear in the CHANGELOG and be visible to all users!
Before merging to main (which will trigger auto-increment), ensure:
- Commit message is clear and descriptive (it will appear in CHANGELOG.md automatically)
- All tests pass
- Documentation is up to date
- Consider if the change warrants a minor or major version bump (manually adjust if needed)
- Patch auto-increment (0.0.1) is appropriate for most changes
- Minor bump (0.1.0) may be needed for significant new features
- Major bump (1.0.0) may be needed for breaking changes
- Breaking changes are clearly documented
The ha_sentry/CHANGELOG.md follows the Home Assistant Add-on standard format:
- Version heading: Use
## X.Y.Z(version number only, no date suffix)- Example:
## 1.2.0 - Home Assistant Supervisor parses these headings to match the version in config.yaml
- Important: Do NOT add dates or "TBD" suffixes as Home Assistant expects exact version matches
- Example:
- Changes: List changes as simple bullet points with
-- Keep entries clear and concise
- Group related changes together
- You may use subsections (Added, Changed, Fixed, etc.) for clarity, but they're optional
- Order: Newest version at the top
- Format: Use standard Markdown formatting
Example:
## 1.2.0
- Added new feature X
- Fixed bug in Y component
- Improved performance of Z operation
- Updated documentation for clarity
## 1.1.0
- Added support for Home Assistant 2024.12
- Fixed dashboard creation issueWhy this format?
Home Assistant Supervisor:
- Reads config.yaml → gets version (e.g., "1.2.0")
- Looks for ha_sentry/CHANGELOG.md (in the add-on directory)
- Parses markdown headings looking for exact match:
## 1.2.0 - Displays the content under that heading
If the version heading includes dates or other suffixes, Home Assistant will not find a match and will show "No changelog found".
After code is merged to main:
- The version is automatically incremented in both config files
- The new version will be available to users via Home Assistant's add-on store (when the add-on is published)
- Users with auto-update enabled will receive the update automatically
If the auto-increment workflow doesn't run after a commit to main:
- Check the workflow run in the "Actions" tab on GitHub
- Verify the commit was made to the
mainbranch - Check if the commit was made by
github-actions[bot](it will skip to prevent infinite loops) - Verify the push didn't only modify
.github/workflows/**files (these are ignored)
If the version wasn't incremented after a commit:
- Check the workflow logs in the "Actions" tab on GitHub
- Look for the "Check if commit is from bot" step - it may have skipped
- Verify both config files have the same version format (X.Y.Z)
- Manually update the version if needed (see "Manual Version Updates" above)
The workflow has built-in safeguards:
- Skips execution if the commit author is
github-actions[bot] - Ignores changes to workflow files (
.github/workflows/**) - Only commits if there are actual changes to the version files
If you suspect an infinite loop:
- Check the commit history for repeated bot commits
- Review the workflow logs for any errors
- The safeguards should prevent this, but you can temporarily disable the workflow if needed