chore(workflows/release): add Yarn 4 guard for publish step #2150
+12
−2
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.



Hey, I just made a Pull Request!
Description
After #2142 PR merged, I noticed that the
"Release all workspaces"failed at thepublishstep:Job: https://github.com/redhat-developer/rhdh-plugins/actions/runs/21294851539/job/61298178895
It seems yarn 4.* requires a scope flag (all/recursive/since/worktree) for
yarn workspaces foreach, otherwise it fails. This PR adds-Ascope flag only when Yarn 4 is detected to preserve Yarn 3 behavior.Extra info
I tried using yarn 3.8.7 locally, but
yarn dedupehit an assertion error.I tried to fix it, but did not succeed. That's why I opted to use yarn 4, since it worked fine.
If yarn 3 is preferred, I'm happy to adjust. let me know if you've seen this issue before and how to fix it ☕
✔️ Checklist