Skip to content

feat: support pnpm install - #138

Open
yusuke99 wants to merge 1 commit into
voidzero-dev:mainfrom
yusuke99:feat/pnpm-install
Open

feat: support pnpm install#138
yusuke99 wants to merge 1 commit into
voidzero-dev:mainfrom
yusuke99:feat/pnpm-install

Conversation

@yusuke99

@yusuke99 yusuke99 commented Sep 2, 2026

Copy link
Copy Markdown

Closes #27

Add an optional pnpm input so workflows can install pnpm globally, allowing executable path which makes running pnpm command available. It is defaulted to false.

Usage:

- uses: voidzero-dev/setup-vp@1.18.0
  with:
    pnpm: true

I have verified that my fork's CI have passed and executable path is available.

If you want to verify GitHub Actions locally via act, here's how 👇

*Make sure Docker is running to test with act

.github/workflows/test.yml

test-pnpm:
  strategy:
    fail-fast: false
    matrix:
      os: [ubuntu-latest, macos-latest, windows-latest]
  runs-on: ${{ matrix.os }}
  steps:
    # 👇 Make sure this is commented so that you can test this locally
    # - uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2

    - name: Setup Vite+ with global pnpm
      uses: ./
      with:
        pnpm: true
        run-install: false
        cache: false

    - name: Verify pnpm is installed globally
      shell: bash
      run: |
        global_list="$(vp list -g pnpm)"
        echo "$global_list"
        if [[ "$global_list" == *"No global packages matching 'pnpm'"* ]]; then
          echo "pnpm was not installed globally" >&2
          exit 1
        fi
        pnpm --version

Run the following:

act push \                    
  -W ".github/workflows/test.yml" \
  -j test-pnpm \
  --matrix os:ubuntu-latest \
  -P ubuntu-latest=catthehacker/ubuntu:act-latest \
  --pull=false \
  --bind

Referece: https://github.com/nektos/act

setup-vp.mp4

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.

Auto install pnpm to global

1 participant