Skip to content

Dafnik/setup-node-pnpm

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

setup-node-pnpm

A composite Action for setting up Node and PNPM.

Usage

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout your repository using git
        uses: actions/checkout@v3

      - name: setup node and pnpm
        uses: dafnik/setup-node-pnpm@v3
        # with:
        #   pnpm: 8
        #   node: 22
        #   node-file: ''
        #   cwd: '.'
        #   install: false
        #   install-ignore-scripts: false
Inputs Default value Description
pnpm 9 PNPM version to install
node 22 Version Spec of the version to use in SemVer notation.
It also emits such aliases as lts, latest, nightly and canary builds.
Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node
node-file '' File containing the version Spec of the version to use.
Examples: .nvmrc, .node-version, .tool-versions.
If node and node-file are both provided the action will use version from node-file.
cwd . Changes pnpm-lock.yaml lookup location and the work directory of "pnpm install" if enabled
install false Runs "pnpm install" in working directory
install-ignore-scripts false Runs "pnpm install --ignore-scripts" in working directory. Enable "install" or "install-ignore-scripts" only once

Furthermore, see action.yml

Testing

Local testing is done with act

Run the test workflow:

act -j test

Release instructions

In order to release a new version of this action:

  1. Locate the semantic version of the upcoming release (a draft is maintained by the draft-release workflow).

  2. Publish the draft release from the main branch with semantic version as the tag name, with the checkbox to publish to the GitHub Marketplace checked. ☑️

  3. After publishing the release, the release workflow will automatically run to create/update the corresponding the major version tag such as v0.

    ⚠️ Environment approval is required. Check the Release workflow run list.

License

The scripts and documentation in this project are released under the MIT License.