Skip to content

add workflow dispatch for releases#6372

Merged
adhami3310 merged 3 commits into
mainfrom
add-workflow-dispatch-but-for-releases
Apr 23, 2026
Merged

add workflow dispatch for releases#6372
adhami3310 merged 3 commits into
mainfrom
add-workflow-dispatch-but-for-releases

Conversation

@adhami3310
Copy link
Copy Markdown
Member

No description provided.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 23, 2026

Greptile Summary

This PR introduces a new dispatch_release workflow that allows maintainers to manually trigger versioned releases for any of the 17 packages in the monorepo. The workflow follows a clean detect → plan → gate (release-* only) → parallel release pipeline, correctly using job outputs to pass data between jobs rather than GitHub variables (per repo convention), and delegates version-bump logic to a standalone plan.py script using packaging.Version.

Confidence Score: 5/5

Safe to merge — the workflow is well-structured, all findings are P2 style nits, and the gate mechanism correctly protects stable releases from accidental dispatch.

No P0 or P1 issues found. The inter-job data passing uses job outputs (not stale GitHub variables), version-bump logic is well-validated in plan.py, and the optional gate pattern with always() is implemented correctly. The single P2 comment is a minor redundancy in plan.py.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/dispatch_release.yml Main workflow orchestrating detect → plan → gate (for release-* actions) → release jobs; uses job outputs for inter-job data, always() pattern for optional gate, and matrix strategy for parallel releases.
.github/scripts/dispatch_release/plan.py Core version-bump logic: parses PEP 440 tags, computes next version for each action type, validates preconditions (e.g. no post-release from alpha), writes markdown summary and JSON matrix output.
.github/scripts/dispatch_release/detect.sh Maps boolean workflow inputs to package names via indirect variable expansion and emits a JSON array to GITHUB_OUTPUT; fails if no packages selected.
.github/scripts/dispatch_release/create_release.sh Creates a GitHub release via gh release create, marking it as prerelease/non-latest for prerelease actions, and non-latest for non-reflex stable releases.
.github/scripts/dispatch_release/trigger_publish.sh Triggers the publish.yml workflow dispatch with the generated tag; straightforward and safe.
.github/scripts/dispatch_release/show_plan.sh Renders the approved release plan as a markdown table to GITHUB_STEP_SUMMARY using jq; clean and correct.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A([workflow_dispatch\naction + package checkboxes]) --> B[detect job\ndetect.sh]
    B -->|packages JSON| C[plan job\nplan.py]
    C -->|releases JSON matrix| D{action starts\nwith release-?}
    D -->|yes| E[gate job\ndispatch-release-approval env\nrequires manual approval]
    D -->|no - skipped| F
    E -->|approved| F[release job\nmatrix per package]
    E -->|rejected / timeout| G([workflow fails])
    F --> H[create_release.sh\ngh release create TAG]
    H --> I[trigger_publish.sh\ngh workflow run publish.yml]
Loading

Reviews (3): Last reviewed commit: "improve on script handling" | Re-trigger Greptile

Comment thread .github/workflows/dispatch_release.yml Outdated
Comment thread .github/workflows/dispatch_release.yml Outdated
Comment thread .github/workflows/dispatch_release.yml
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 23, 2026

Merging this PR will not alter performance

✅ 9 untouched benchmarks


Comparing add-workflow-dispatch-but-for-releases (f03565f) with main (360075e)

Open in CodSpeed

@adhami3310
Copy link
Copy Markdown
Member Author

@greptile

@adhami3310
Copy link
Copy Markdown
Member Author

@greptile

@adhami3310 adhami3310 merged commit c5dd224 into main Apr 23, 2026
68 of 69 checks passed
@adhami3310 adhami3310 deleted the add-workflow-dispatch-but-for-releases branch April 23, 2026 20:30
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.

2 participants