Skip to content

ci: set up Yarn via Corepack in check-release action#9091

Merged
Mrtenz merged 2 commits into
mainfrom
mrtenz/enable-corepack-in-check-release
Jun 11, 2026
Merged

ci: set up Yarn via Corepack in check-release action#9091
Mrtenz merged 2 commits into
mainfrom
mrtenz/enable-corepack-in-check-release

Conversation

@Mrtenz

@Mrtenz Mrtenz commented Jun 11, 2026

Copy link
Copy Markdown
Member

Explanation

The check-release composite action invokes yarn workspaces list to 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 the packageManager field in package.json (yarn@4.16.0) with:

This project's package.json defines "packageManager": "yarn@4.16.0". However the current global version of Yarn is 1.22.22.

This PR replaces the standalone actions/checkout@v5 step with MetaMask/action-checkout-and-setup@v3, which sets up Node and Yarn via Corepack. The new skip-install: true input (added in v3.4.0) skips yarn install, which this action does not need — it only needs yarn workspaces list, which reads workspace globs from package.json directly.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

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 list because the runner used global Yarn 1.x instead of the repo’s pinned Yarn 4 from packageManager.

The action’s checkout step is replaced with MetaMask/action-checkout-and-setup@v3, enabling Corepack/Yarn without running yarn install (skip-install: true). In main.yml, the check-release job’s checkout now uses fetch-depth: 0 so 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.

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.
Comment thread .github/actions/check-release/action.yml Dismissed
`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.
@Mrtenz Mrtenz marked this pull request as ready for review June 11, 2026 10:46
@Mrtenz Mrtenz requested a review from a team as a code owner June 11, 2026 10:46
@Mrtenz Mrtenz temporarily deployed to default-branch June 11, 2026 10:46 — with GitHub Actions Inactive
@Mrtenz Mrtenz added this pull request to the merge queue Jun 11, 2026
Merged via the queue into main with commit a56a731 Jun 11, 2026
376 checks passed
@Mrtenz Mrtenz deleted the mrtenz/enable-corepack-in-check-release branch June 11, 2026 11:10
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.

3 participants