Migrate release automation from scripts/release.py to reflex-release package
Merged
MA
2mo ago+1311+1311+0123456789012345678901234567890123456789-2915-2915-0123456789012345678901234567890123456789
Type of change
- Breaking change (the old
scripts/release.pyis removed and replaced with thereflex-releasepackage) - This change requires a documentation update
Summary
This PR completes the migration of the changelog-driven release automation from the monolithic scripts/release.py script to the modular reflex-release package. The old script and its associated shell helper scripts are removed, and the generated CI workflows are now produced by the reflex-release package's templating system.
Key changes:
-
Removed legacy release infrastructure:
scripts/release.py(1329 lines) — the original monolithic release helperscripts/release.py.lock— its dependency lock filetests/units/test_release.py(779 lines) — tests for the old script- Shell helper scripts in
.github/scripts/dispatch_release/and.github/scripts/publish/
-
Migrated to reflex-release package:
- All release logic now lives in
packages/reflex-release/src/reflex_release/ - Generated workflows are produced by
reflex-release syncfrom[tool.reflex-release]config inpyproject.toml - Workflows now include generation headers and drift detection
- All release logic now lives in
-
Enhanced workflow generation:
- Added
uv-versionandpython-versionconfiguration to pin exact toolchain versions in generated workflows (defaults: uv 0.12.5, Python 3.10) - Increased
workflow_dispatchpackage checkbox limit from 9 to 19 (matching GitHub's actual limit) - Workflows now include
@@UV_SETUP_WITH@@placeholders for pinned uv setup - Added optional
.github/scripts/publish/post_build.shhook for repository-specific artifact checks
- Added
-
Configuration:
- Added
[tool.reflex-release]section topyproject.tomlwith package list and workflow configuration - Workflows are now generated and checked for drift via
reflex-release sync --check
- Added
-
Documentation updates:
- Updated
CONTRIBUTING.mdto referencereflex-release createinstead oftowncrier create - Updated
packages/reflex-release/README.mdwith new configuration options - Updated
AGENTS.mdwith reflex-release commands
- Updated
Workflow improvements:
- publish.yml: Split into five stages (prepare, build, collect, publish, tag-and-release) with clearer separation of concerns
- dispatch_release.yml: Simplified with generated package checkboxes and improved documentation
- changelog.yml: Added workflow drift detection and improved guards
- release_from_changelog.yml: Cleaner structure with generated configuration
- auto_release_internal.yml: Simplified internal package release automation
All generated workflows include a header indicating they are auto-generated and instructions for regeneration.
Testing
- Existing unit tests in
tests/units/reflex_release/cover the reflex-release package functionality - Added tests for new configuration options (
DEFAULT_UV_VERSION,DEFAULT_PYTHON_VERSION) - Added tests for workflow template pinning and drift detection
- CI workflows validate generated workflow consistency via
reflex-release sync --check
Migration notes
Repositories using this release automation should:
- Run
uv run --frozen --package reflex-release reflex-release syncto generate workflows from the new configuration - Optionally add
uv-versionandpython-versionto[tool.reflex-release]to pin toolchain versions - Update any custom release scripts to use
reflex-releasecommands instead ofscripts/release.py