Skip to content

Commit 7d1eb64

Browse files
committed
ci: add the v1 release workflow, move to Node 24, refresh dependencies
Three things the v1 line needs before it can ship. **The v1 release workflow.** `changeset publish` tags `latest` by default, even when publishing a lower version number — so once v2 is out, releasing v1 through the existing workflow would silently move `latest` backwards and every fresh `npm install @headstartwp/core` would resolve to v1. Adds release-v1.yml, triggered by pushes to the `v1` branch, publishing via a new `publish:v1` script that passes `--tag latest-v1`. Consumers pin the line with `@headstartwp/core@latest-v1`. It deliberately has no plugin-release job: the WordPress plugin is published from trunk and develop, and pushing it from here would race those branches for the same destination repository. **Node 24 baseline.** .nvmrc and the root `engines` move to 24, and every workflow moves to it — unit-tests was still running a [16.x, 18.x, 20.x] matrix, which is two EOL releases and one about to be. Note this is the monorepo root, which governs contributors and CI; it is not a published package, so it does not change what consumers must run. The v1 packages deliberately keep no `engines` field, because raising the floor in a minor would strand exactly the pages-router users this line exists to support. **Dependency refresh.** No minor has shipped in about four months, so `npm update` was four months stale: 33 in-range updates applied, now down to 2. Deliberately in-range only — the 37 major-version jumps behind (storybook 8 -> 10, commitlint 13 -> 21, the @wordpress/* line, jest 29 -> 30) are a separate modernisation effort and would put the "still supports the pages router" guarantee at risk in a release whose whole point is stability. One blocker had to be cleared first: `npm update` failed with ERESOLVE because block-primitives pinned @testing-library/react ^14 while core and next were on ^16. Aligned to ^16.3.0, which is the same split PR #951 fixed on the v2 line. Verified: core 46/46 suites / 247 tests, next 28/28 / 113 tests, block-primitives 2/2, core and next build and lint clean.
1 parent 41ad32b commit 7d1eb64

13 files changed

Lines changed: 8610 additions & 5735 deletions

.github/workflows/build-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
max-parallel: 1
1414
matrix:
1515
os: [ubuntu-latest, windows-latest]
16-
node-version: [18, 20, 22]
16+
node-version: [24]
1717
exclude:
1818
- os: windows-latest
19-
node-version: 18
19+
node-version: 24
2020
- os: windows-latest
21-
node-version: 20
21+
node-version: 24
2222

2323
steps:
2424
- name: Configure Git line endings

.github/workflows/deploy-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v3
1717
- uses: actions/setup-node@v3
1818
with:
19-
node-version: 20
19+
node-version: 24
2020
cache: npm
2121
- name: Install dependencies
2222
run: npm install

.github/workflows/eslint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
strategy:
1313
matrix:
14-
node-version: [20.x]
14+
node-version: [24.x]
1515

1616
steps:
1717
- name: Checkout

.github/workflows/nextjs_bundle_analysis-app-router.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Set up node
2626
uses: actions/setup-node@v3
2727
with:
28-
node-version: '20.x'
28+
node-version: '24.x'
2929

3030
- name: Install dependencies
3131
run: (cd ../../ && npm ci)

.github/workflows/nextjs_bundle_analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Set up node
2828
uses: actions/setup-node@v3
2929
with:
30-
node-version: '20.x'
30+
node-version: '24.x'
3131

3232
- name: Install dependencies
3333
uses: bahmutov/npm-install@v1

.github/workflows/npm-release-next-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup Node.js
2323
uses: actions/setup-node@v3
2424
with:
25-
node-version: 20.x
25+
node-version: 24.x
2626

2727
- name: Install Dependencies
2828
run: npm ci

.github/workflows/release-latest-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Setup Node.js
2828
uses: actions/setup-node@v3
2929
with:
30-
node-version: 20.x
30+
node-version: 24.x
3131

3232
- name: Install Dependencies
3333
run: npm ci

.github/workflows/release-v1.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Release @latest-v1
2+
3+
# Releases the maintenance line for consumers who are staying on the Next.js pages router.
4+
#
5+
# The reason this workflow exists at all: `changeset publish` tags `latest` by default, even when
6+
# publishing a *lower* version number. Once v2 is out, a v1 release from the default workflow would
7+
# silently move the `latest` dist-tag backwards, and every fresh `npm install @headstartwp/core`
8+
# would resolve to v1. This publishes under `latest-v1` instead, so the two lines coexist.
9+
#
10+
# Consumers pin the v1 line with:
11+
# npm install @headstartwp/core@latest-v1
12+
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
17+
on:
18+
push:
19+
branches:
20+
- v1
21+
workflow_dispatch:
22+
23+
concurrency: ${{ github.workflow }}-${{ github.ref }}
24+
25+
jobs:
26+
packages:
27+
name: Release
28+
runs-on: ubuntu-latest
29+
# Belt and braces: the trigger already restricts this, but a mis-fired workflow_dispatch on
30+
# another ref must not publish from it.
31+
if: github.ref == 'refs/heads/v1'
32+
steps:
33+
- name: Checkout Repo
34+
uses: actions/checkout@v4
35+
with:
36+
# changesets needs the full history to work out what to release.
37+
fetch-depth: 0
38+
39+
- name: Setup Node.js
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: 24.x
43+
44+
- name: Install Dependencies
45+
run: npm ci
46+
47+
- name: Create Release Pull Request or Publish to npm
48+
id: changesets
49+
uses: changesets/action@v1
50+
with:
51+
# `publish:v1` differs from `publish` only in passing `--tag latest-v1`.
52+
publish: npm run publish:v1
53+
version: npm run version
54+
title: 'Release v1 (@latest-v1)'
55+
commit: 'chore: version packages (v1)'
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
59+
60+
# Deliberately no `plugin-release` job. The WordPress plugin is published from trunk and develop
61+
# only; the v1 line ships npm packages, and pushing the plugin from here would race those branches
62+
# for the same target repository.

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
strategy:
1313
matrix:
14-
node-version: [16.x, 18.x, 20.x]
14+
node-version: [24.x]
1515

1616
steps:
1717
- name: Checkout

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20
1+
24

0 commit comments

Comments
 (0)