Skip to content

Pin Node in the release workflow #18

Description

@donnchawp

Follow-up to #14.

The problem

.github/workflows/create-release.yml:41 runs a bare npm install with no actions/setup-node step. There is no .nvmrc and no engines field in package.json, so the release build takes whatever Node the runner image happens to ship.

That was harmless while the dependency floor was low. #14 raised it. @wordpress/theme 1.0.0 declares:

"engines": { "node": "^20.19.0 || >=22.13.0", "npm": ">=10.2.3" }

and the package is ESM only. @wordpress/theme 0.13.0 previously wanted only node >=18.12.0.

npm will not enforce engines without engine-strict, so nothing fails today. But the release build's Node version is now load-bearing and unpinned, and stylelint runs in that same path as of #14. A runner image bump is enough to change behaviour with no commit to point at.

Fix

Add an explicit actions/setup-node step to the workflow before npm install, pinned to a version satisfying ^20.19.0 || >=22.13.0. Consider also adding .nvmrc or an engines field so local make build and CI agree, since a release can be cut from either.

Note on scope

.github/workflows/create-release.yml is one of the files meant to stay identical across the plugin family (jetpack-crm, crowdsignal-forms, crowdsignal-plugin, WP-Job-Manager, wp-super-cache). Pinning Node is a generic improvement rather than a CRM-specific one, so it should be backported to all five rather than landed here alone.

Probably worth doing alongside the build gate in the other follow-up, since both touch shared tooling and want the same backport pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions