name: "Setup vp" description: "Install Vite+ (vp) and optionally cache project dependencies" author: "voidzero-dev" branding: icon: zap color: purple inputs: version: description: "Version of Vite+ to install. Takes precedence over version-file. When neither is set, the version is auto-detected from the project's package.json (its vite-plus dependency or catalog entry; a semver range is resolved to the exact version in the lockfile), falling back to the latest release." required: false default: "" version-file: description: "Path to a file to resolve the Vite+ version from (package.json, pnpm-workspace.yaml, or .yarnrc.yml). A package.json `vite-plus` entry of `catalog:`/`catalog:` is resolved through the nearest catalog source: pnpm-workspace.yaml (pnpm), .yarnrc.yml (yarn), or a root package.json `catalog`/`catalogs` (bun). Ignored when version is specified." required: false run-install: description: "Run `vp install` after setup. Accepts boolean or YAML object with cwd/args." required: false default: "true" sfw: description: "Wrap `vp install` with Socket Firewall Free (sfw) to block malicious dependency fetches. Works on Linux, macOS, and Windows (macOS/Windows require Vite+ v0.1.23+). See https://docs.socket.dev/docs/socket-firewall-free." required: false default: "false" node-version: description: "Node.js version to install via `vp env use`. Omit this input and node-version-file to let Vite+ resolve the version. `vp env default ` sets the user-level default. Vite+ checks the project, this default, and then the latest LTS release." required: false node-version-file: description: "Path to file containing the Node.js version spec (.nvmrc, .node-version, .tool-versions, package.json). Ignored when node-version is specified." required: false node-manager: description: "Control Vite+'s Node.js version manager. When unset, the Vite+ installer decides (enabled on CI). Set to `false` to keep the Node.js already on the runner (e.g. from actions/setup-node or the runner image): shim creation is skipped and vp commands prefer the system Node.js. Set to `true` to force-enable the managed Node.js. Cannot be `false` together with node-version or node-version-file." required: false working-directory: description: "Project directory to use for relative paths, lockfile auto-detection, environment checks, and default `vp install` execution." required: false cache: description: "Enable caching of project dependencies" required: false default: "false" cache-save: description: "Whether to save the dependency cache in the post action. Has no effect when cache is false." required: false default: "true" cache-dependency-path: description: "Path to lock file for cache key generation. Auto-detected if not specified." required: false registry-url: description: "Optional registry to set up for auth. Will write .npmrc in $RUNNER_TEMP with registry and auth config, and set NPM_CONFIG_USERCONFIG to point npm at it. Auth token is read from env.NODE_AUTH_TOKEN." required: false scope: description: "Optional scope for authenticating against scoped registries. Will fall back to the repository owner when using the GitHub Packages registry (https://npm.pkg.github.com/)." required: false outputs: version: description: "The installed version of Vite+" cache-hit: description: "Boolean indicating if cache was restored" runs: using: node24 main: dist/index.mjs post: dist/index.mjs post-if: success()