ci: set up Yarn via Corepack in check-release action#9091
Merged
Conversation
The check-release composite action invokes `yarn workspaces list` but never sets up the project's pinned Yarn version, so the runner's global Yarn 1.22.22 is used and rejected against the `packageManager` pin of `yarn@4.16.0`. Use `MetaMask/action-checkout-and-setup@v3` with the new `skip-install: true` input (added in v3.4.0) so Node and Yarn are set up via Corepack without paying the cost of `yarn install`, which this action does not need.
`MetaMask/action-checkout-and-setup` only re-checks out when `.git` does not exist. Since the parent workflow's checkout creates `.git` first (required so GitHub can locate `./.github/actions/check-release`), the composite action's checkout was being skipped — leaving the runner with only the parent's shallow `fetch-depth: 1`. As a result, `refs/remotes/origin/main` was never fetched and `git merge-base` failed. Set `fetch-depth: 0` on the parent's checkout and drop the now-no-op `fetch-depth: 0` from the composite.
GuillaumeRx
approved these changes
Jun 11, 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.
Explanation
The
check-releasecomposite action invokesyarn workspaces listto enumerate published packages, but the job calling it never sets up the project's pinned Yarn version. As a result, the runner's global Yarn 1.22.22 is used, which fails against thepackageManagerfield inpackage.json(yarn@4.16.0) with:This PR replaces the standalone
actions/checkout@v5step withMetaMask/action-checkout-and-setup@v3, which sets up Node and Yarn via Corepack. The newskip-install: trueinput (added in v3.4.0) skipsyarn install, which this action does not need — it only needsyarn workspaces list, which reads workspace globs frompackage.jsondirectly.References
Checklist
Note
Low Risk
CI-only workflow changes; no application runtime or release publish logic is modified.
Overview
Fixes the check-release composite action failing when it runs
yarn workspaces listbecause the runner used global Yarn 1.x instead of the repo’s pinned Yarn 4 frompackageManager.The action’s checkout step is replaced with
MetaMask/action-checkout-and-setup@v3, enabling Corepack/Yarn without runningyarn install(skip-install: true). Inmain.yml, the check-release job’s checkout now usesfetch-depth: 0so merge-base/git history checks still work after checkout moved out of the composite action.Reviewed by Cursor Bugbot for commit f178d76. Bugbot is set up for automated code reviews on this repo. Configure here.