fix: trigger server release workflows on workflow changes#1939
Merged
Conversation
|
Contributor
There was a problem hiding this comment.
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant Dev as Developer
participant GHA as GitHub Actions Trigger
participant Runner as Release Workflow Runner
participant Git as Git CLI
Dev->>GHA: Push to main
Note over GHA: Evaluates path filters
alt NEW: Workflow file changed OR .changeset/*.md changed
GHA->>Runner: Start Release Job (v3 or v4)
Runner->>Git: Fetch latest release tag
Git-->>Runner: latest_tag (e.g., stagehand-server-v3/v1.0.0)
Note over Runner,Git: Identify pending changes
Runner->>Git: CHANGED: git diff --diff-filter=d --name-only
Note right of Git: --diff-filter=d ignores files that<br/>were deleted in the current branch
Git-->>Runner: List of added/modified .changeset/*.md files
alt Changes detected
Runner->>Runner: Execute Build & Publish tasks
else Only deletions or no changes detected
Runner->>Runner: Terminate (No new release needed)
end
else No relevant paths changed
GHA-->>Dev: No workflow triggered
end
pirate
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trigger the server-v3 and server-v4 release workflows when their workflow files change, and ignore deleted changeset files during release detection.
Summary by cubic
Make server-v3 and server-v4 release workflows run when their own workflow files change, and prevent false releases by ignoring deleted changeset files.
.github/workflows/stagehand-server-v3-release.ymland.github/workflows/stagehand-server-v4-release.ymlon pushes tomain.git diff --diff-filter=dso removed.changeset/*.mdfiles don’t count as changes.Written for commit 3f5911a. Summary will update on new commits. Review in cubic