Open kopach opened 1 year ago
For anyone interested, as a workaround, I'm doing this right now
- name: Get PNPM version from package.json
id: pnpm-version
shell: bash
run: echo "pnpm_version=$(node -p 'require(`./package.json`).engines.pnpm')" >> $GITHUB_OUTPUT
- name: Install PNPM
uses: pnpm/action-setup@v2.2.4
with:
version: ${{ steps.pnpm-version.outputs.pnpm_version }}
In my projects, I'm trying to specify exact versions of dependencies (including
node
andpnpm
).I would like to specify a version of
pnpm
once inpackage.json
and reuse inpnpm/action-setup
actionpackage.json
hasengines
section for thisWould be great, if
pnpm/action-setup
could support this field.Note:
actions/setup-node
supportsengines.node
vianode-version-file
property.I'm also aware of
packageManager
property ofpackage.json
, but with it – I can't enforce exact version of PNPM, however withengines.pnpm
+engine-strict=true
- I can, so everyone in the team has same environmentIt might be related to this: https://github.com/pnpm/action-setup/issues/24