Skip to content

Conversation

JnyJny
Copy link
Owner

@JnyJny JnyJny commented Jul 26, 2025

Summary

  • Modernize GitHub Actions workflows
  • Add dynamic Python version detection from pyproject.toml with fallback to template defaults
  • Separate build and publish jobs for better reliability and artifact management
  • Add auto-changelog generation with BobAnkh action for structured release notes
  • Implement repository dispatch for automated documentation deployment
  • Enable GitHub Pages auto-configuration in docs workflow
  • Enhance error handling and performance with caching

Changes

Release Workflow (release.yaml)

  • Dynamic Python Version Detection: Extract test versions from pyproject.toml using uv run toml get with fallback to cookiecutter defaults
  • Separate Build Job: Split build into its own job that creates artifacts for both publish and release steps
  • Artifact Management: Use upload/download-artifact actions for better separation of concerns
  • Enhanced Error Handling: Add set -euo pipefail and better error messaging in release notes generation
  • Auto-changelog Generation: Add BobAnkh/auto-generate-changelog action for structured changelog updates
  • Documentation Deployment Trigger: Add job to trigger docs deployment via repository dispatch after successful release
  • Better Caching: Add enable-cache: true to uv setup actions

Documentation Workflow (docs.yml)

  • Repository Dispatch Trigger: Add repository_dispatch event for triggering from release workflow
  • Auto-enable GitHub Pages: Add step to automatically enable Pages if not already configured
  • Better Conditional Logic: Improve deployment conditions to handle both manual and automatic triggers
  • Enhanced Caching: Add caching to uv setup

Template Compatibility

  • ✅ All Jinja2 parametrization preserved ({{ cookiecutter.* }} variables)
  • ✅ GitHub Actions expressions properly wrapped in {% raw %} blocks
  • ✅ Template renders correctly (verified with test generation)
  • ✅ Fast test suite passes (26/26 tests)

Test Plan

  • Generated test project with poe bake to verify template rendering
  • Verified all cookiecutter variables render correctly in workflows
  • Confirmed GitHub Actions syntax is valid
  • Ran fast test suite (26 tests pass in ~41 seconds)
  • Applied ruff formatting to maintain code quality

Benefits

  • Reliability: Separate jobs prevent single point of failure
  • Performance: Parallel execution and artifact caching
  • Maintainability: Dynamic version detection reduces manual updates
  • Automation: Auto-changelog and docs deployment reduce manual steps
  • Flexibility: Repository dispatch allows docs deployment on-demand

Based on proven patterns from busylight-core while maintaining full cookiecutter template compatibility.

🤖 Generated with Claude Code

JnyJny and others added 5 commits July 26, 2025 13:32
- Add dynamic Python version detection from pyproject.toml with fallback
- Separate build and publish jobs for better reliability
- Add auto-changelog generation with BobAnkh action
- Implement artifact management between workflow jobs
- Add repository dispatch for automated docs deployment
- Enable GitHub Pages auto-configuration in docs workflow
- Enhance error handling with set -euo pipefail
- Add caching to uv setup actions for improved performance
- Preserve all Jinja2 template parametrization

Based on busylight-core workflow patterns while maintaining
cookiecutter template compatibility.

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

Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Document new release workflow stages and dynamic Python version detection
- Add documentation deployment workflow details
- Explain changelog and release automation features
- Provide configuration examples for pyproject.toml
- Maintain existing Jinja formatting documentation

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

Co-Authored-By: Claude <[email protected]>
Add [tool.{{ cookiecutter.package_name }}.ci] section with test-python-versions
configuration that the dynamic Python version detection workflow can read.

This allows generated projects to override the default Python test matrix
by configuring their pyproject.toml instead of modifying workflow files.

Example:
[tool.my_package.ci]
test-python-versions = ["3.11", "3.12", "3.13"]

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

Co-Authored-By: Claude <[email protected]>
@JnyJny
Copy link
Owner Author

JnyJny commented Jul 26, 2025

LGTM

@JnyJny JnyJny merged commit f176ede into main Jul 26, 2025
@JnyJny JnyJny deleted the features/update-github-workflows branch July 27, 2025 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant