Skip to content

Commit

Permalink
refactor(workflows/ci): better workaround for installing yarn on node 16
Browse files Browse the repository at this point in the history
  • Loading branch information
SunsetTechuila committed Jun 13, 2024
1 parent 8825395 commit 2e0cf70
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup target Node.js to enable Corepack
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Enable Corepack
if: matrix.node != '16'
run: corepack enable

- name: Fix yarn install on Node 16
if: matrix.node == '16'
run: |
corepack disable
yarn_version=$(node -p "require('./package.json').packageManager.match(/\w+@([\d.]+)/)[1]")
npm pkg delete packageManager
npm install -g yarn --force
yarn set version $yarn_version
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
Expand Down

0 comments on commit 2e0cf70

Please sign in to comment.