Skip to content

Commit 29eb7f3

Browse files
committed
ci: run workflows on Node 24 with minimum 22 guard
Add setup-node 24 to all jobs (check previously had no explicit Node). Order setup-node before setup-bun for release so npm auth uses Node 24. Assert major >=22 in check, prerelease-pack, and release.
1 parent 1f6aa6d commit 29eb7f3

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313

14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: "24"
17+
1418
- uses: oven-sh/setup-bun@v2
1519
with:
1620
bun-version: 1.3.11
@@ -27,26 +31,32 @@ jobs:
2731
- name: Unit tests
2832
run: bun run test
2933

34+
- name: Assert Node.js version
35+
run: node -e "const v=+process.version.slice(1).split('.')[0]; if(v<22)process.exit(1)"
36+
3037
prerelease-pack:
3138
needs: check
3239
runs-on: ubuntu-latest
3340
steps:
3441
- uses: actions/checkout@v4
3542

36-
- uses: oven-sh/setup-bun@v2
43+
- uses: actions/setup-node@v4
3744
with:
38-
bun-version: 1.3.11
45+
node-version: "24"
3946

40-
- uses: actions/setup-node@v4
47+
- uses: oven-sh/setup-bun@v2
4148
with:
42-
node-version: "22"
49+
bun-version: 1.3.11
4350

4451
- name: Install dependencies
4552
run: bun install --frozen-lockfile
4653

4754
- name: Build
4855
run: bun run build
4956

57+
- name: Assert Node.js version
58+
run: node -e "const v=+process.version.slice(1).split('.')[0]; if(v<22)process.exit(1)"
59+
5060
- name: Pack npm tarball (prerelease snapshot)
5161
id: pack
5262
run: |

.github/workflows/release.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,17 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v4
1919

20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: "24"
23+
registry-url: "https://registry.npmjs.org"
24+
2025
- uses: oven-sh/setup-bun@v2
2126
with:
2227
bun-version: 1.3.11
2328

24-
- uses: actions/setup-node@v4
25-
with:
26-
node-version: "22"
27-
registry-url: "https://registry.npmjs.org"
29+
- name: Assert Node.js version
30+
run: node -e "const v=+process.version.slice(1).split('.')[0]; if(v<22)process.exit(1)"
2831

2932
- name: Install dependencies
3033
run: bun install --frozen-lockfile

HUMANS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ bun run setup-hooks # once per clone: use .githooks (pre-commit: check; pre-pu
8686

8787
**Git hooks:** after `setup-hooks`, **pre-commit** runs `bun run check`; **pre-push** runs `bun install --frozen-lockfile`, `bun run build`, `bun run check`, and `bun run test` (same order as CI). Set **`SKIP_GIT_HOOKS=1`** or use **`--no-verify`** to bypass.
8888

89-
**CI:** [`.github/workflows/ci.yml`](.github/workflows/ci.yml) runs on pull requests and pushes to `main`: `bun install --frozen-lockfile`, `bun run build`, `bun run check`, and `bun run test`. A follow-up job **`prerelease-pack`** builds the same tree and runs **`npm pack`**, then uploads a **prerelease `.tgz` artifact** (named with the commit SHA) you can download from the workflow run’s **Artifacts** section (retention 90 days). Match the check job locally before opening a PR.
89+
**CI:** [`.github/workflows/ci.yml`](.github/workflows/ci.yml) runs on pull requests and pushes to `main`: **`actions/setup-node` with Node 24** (minimum 22 asserted), then `bun install --frozen-lockfile`, `bun run build`, `bun run check`, and `bun run test`. A follow-up job **`prerelease-pack`** builds the same tree and runs **`npm pack`**, then uploads a **prerelease `.tgz` artifact** (named with the commit SHA) you can download from the workflow run’s **Artifacts** section (retention 90 days). Match the check job locally before opening a PR.
9090

9191
## Publishing
9292

0 commit comments

Comments
 (0)