Automattic / Automattic/jetpack-crm
Pin Node in the release workflow
- Dominant language
- PHP
- Stars
- 13
- Forks
- 8
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 13
Description
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:
```json
"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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with .github/workflows/create-release.yml at line 41 and inspect the release workflow around npm install. Add the Node setup before installation, then review the corresponding workflow copies for jetpack-crm, crowdsignal-forms, crowdsignal-plugin, WP-Job-Manager, and wp-super-cache. Done means all five release paths use a Node version satisfying the stated dependency floor.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, node.js
- Domain
- build-system, ci-cd, release
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 60/100