WordPress / WordPress/block-development-examples
CI workflows: remove leftover debug guards, EOL Node, outdated actions, pnpm version drift
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 334
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Description
Problem
The four workflows in .github/workflows/ have accumulated cruft and outdated pins:
- Leftover debug guards:
static-linting.ymlgates four steps onif: github.ref != 'refs/pull/11/merge'— a hardcoded reference to long-closed PR #11. It silently disables install+lint for that ref and confuses anyone reading the workflow. - EOL Node for releases:
release-zips.ymlpinsnode-version: '16'(EOL since Sept 2023), so the shipped example zips are built on a runtime nobody develops against — whilestatic-linting.ymluses 18/lts/*..nvmrcsayslts/*, which is not reproducible. - Outdated actions:
actions/checkout@v3andactions/setup-node@v3(deprecated runner Node),peter-evans/create-pull-request@v5(v7 current). Onlygithub-contributors.ymlis on checkout v4. - pnpm version drift:
release-zips.ymlpins pnpm8.7.1,static-linting.ymlpins8, andpackage.jsonhas nopackageManagerfield to act as the source of truth. - No dependency caching in any workflow (
setup-nodewithoutcache). - Release noise:
release-zips.ymlcuts a new dated release and re-tagslateston every push to trunk — including docs-only commits — re-uploading ~30 zips for a README typo. - Minor:
release-zips.ymlrunssudo apt-get install -y ghalthoughghis preinstalled onubuntu-latest, andmkdir -p zipsduplicates themake-dir zipsstep insidenpm run deploy.
Proposed fix
- Remove the
refs/pull/11/mergeguards fromstatic-linting.yml. - Pin
.nvmrcto22and switch all workflows tonode-version-file: '.nvmrc'— one source of truth for local dev, lint, and release builds. - Bump
actions/checkoutandactions/setup-nodeto v4 everywhere;peter-evans/create-pull-requestto v7. - Add
"packageManager": "pnpm@<pinned version>"topackage.jsonand make both workflows install pnpm from it (e.g.pnpm/action-setupwith no version input). - Enable
cache: pnpminsetup-node. - Path-filter the
release-zips.ymlpush trigger to build inputs (e.g.plugins/**,package.json,pnpm-lock.yaml) so docs-only commits don't cut releases; keepworkflow_dispatchas the manual escape hatch. - Drop the redundant
ghinstall andmkdir -p zipssteps.
Out of scope
- The new e2e CI workflow (#147).
- A build-freshness check for committed
build/directories (separate issue, coming). - New lint dimensions (markdown lint, PHP compatibility matrix,
_bintype-checking) — worth doing, but separate from this mechanical cleanup.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with .github/workflows/static-linting.yml and release-zips.yml, then inspect .github/workflows/github-contributors.yml, .nvmrc, package.json, and pnpm-lock.yaml for existing version conventions. Update the four workflows and package metadata as proposed, and verify that linting, dependency caching, manual releases, and path-filtered release triggers still work without release noise from documentation-only changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, javascript, json, nodejs, yaml
- Domain
- build-system, ci-cd, devops
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100