action-setup icon indicating copy to clipboard operation
action-setup copied to clipboard

Support pnpm 8

Open claughinghouse opened this issue 2 years ago • 3 comments

With the release of pnpm 8 it would be awesome to have support for it in actions.

claughinghouse avatar Mar 28 '23 14:03 claughinghouse

I was able to use 8 with lockfile v6 in actions.

    - uses: pnpm/[email protected]
      with:
        version: 8

on GHA

Run pnpm/[email protected]
  with:
    version: 8
    dest: ~/setup-pnpm
    run_install: null

thantos avatar Mar 28 '23 18:03 thantos

I specified a pnpm version in package.json

  "packageManager": "[email protected]",

and it works fine with pnpm/action-setup.

Note that [email protected] + Node.js 14 does not work fine but this is another issue: #18 #31

tksst avatar Mar 29 '23 03:03 tksst

my workaround with using node 14.x and pnpm 8 :

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        node-version: [14.x, 16.x, 18.x]
        os: [ubuntu-latest, windows-latest]
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: Install pnpm
        if: ${{ matrix.node-version != '14.x' }}
        uses: pnpm/[email protected]

      - name: Install pnpm (node 14)
        if: ${{ matrix.node-version == '14.x' }}
        run: npm install -g @pnpm/[email protected]

      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node-version }}
          cache: 'pnpm'

fz6m avatar Apr 01 '23 10:04 fz6m