Add towncrier changelog system (#86)

## Summary
- Configure towncrier with custom types (feature, bugfix, infra, doc, misc)
- Build initial v0.1.0 changelog from zk management log entries
- Integrate towncrier into build-blumeops workflow
- Update README to mark Phase 1b complete

## How It Works
1. Add changelog fragments to `docs/changelog.d/` as `<id>.<type>.md`
2. When running build-blumeops workflow, towncrier collects fragments
3. CHANGELOG.md is updated and fragments are removed
4. Changes are committed back to main before docs build

## Testing
- [x] Tested `uvx towncrier build` locally
- [ ] Test workflow execution (after merge)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Reviewed-on: https://forge.ops.eblu.me/eblume/blumeops/pulls/86
This commit is contained in:
Erich Blume 2026-02-03 11:48:13 -08:00
commit 9a8587b83f
6 changed files with 184 additions and 17 deletions

View file

@ -3,8 +3,7 @@
# Creates a versioned release of BlumeOps with all build artifacts.
# Currently includes:
# - Documentation site (Quartz static build)
#
# Future additions may include other release artifacts.
# - Changelog (built from towncrier fragments)
#
# Usage:
# 1. Go to Actions > Build BlumeOps > Run workflow
@ -69,6 +68,57 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
# Need full history for git operations
fetch-depth: 0
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Build changelog
run: |
VERSION="${{ steps.version.outputs.version }}"
# Check if there are any changelog fragments
FRAGMENTS=$(find docs/changelog.d -name "*.md" -not -name ".gitkeep" 2>/dev/null | wc -l)
if [ "$FRAGMENTS" -gt 0 ]; then
echo "Found $FRAGMENTS changelog fragments, building changelog..."
~/.local/bin/uvx towncrier build --version "$VERSION" --yes
echo "changelog_updated=true" >> "$GITHUB_OUTPUT"
else
echo "No changelog fragments found, skipping towncrier"
echo "changelog_updated=false" >> "$GITHUB_OUTPUT"
fi
id: changelog
- name: Commit changelog updates
if: steps.changelog.outputs.changelog_updated == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${{ steps.version.outputs.version }}"
# Configure git
git config user.name "Forgejo Actions"
git config user.email "actions@forge.ops.eblu.me"
# Stage changes (CHANGELOG.md updated, fragments removed)
git add docs/CHANGELOG.md docs/changelog.d/
# Commit
git commit -m "Release $VERSION: Update changelog
Built changelog from towncrier fragments.
[skip ci]"
# Push to main
git push origin HEAD:main
echo "Changelog committed and pushed"
- name: Build docs
run: |