Skip to content

Commit 9f7d318

Browse files
committed
ci: verify release build with Node.js 18
1 parent b0cf3c4 commit 9f7d318

1 file changed

Lines changed: 19 additions & 6 deletions

File tree

.github/workflows/publish.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,35 @@ jobs:
1818

1919
- uses: oven-sh/setup-bun@v2
2020

21-
# Setup .npmrc file to publish to npm
22-
- uses: actions/setup-node@v6
21+
- name: Set up Node.js 18 for runtime verification
22+
uses: actions/setup-node@v6
2323
with:
24-
node-version: '24.x'
25-
registry-url: 'https://registry.npmjs.org'
24+
node-version: '18.17.0'
2625

2726
- run: bun install --frozen-lockfile
2827

2928
- name: Prepare publish version
3029
run: bun scripts/prepublish.ts
3130

31+
- name: Build package
32+
run: bun run build
33+
34+
- name: Verify built CLI with Node.js 18
35+
run: |
36+
node --version
37+
node lib/bin.js -v
38+
39+
- name: Set up Node.js for npm publishing
40+
uses: actions/setup-node@v6
41+
with:
42+
node-version: '24.x'
43+
registry-url: 'https://registry.npmjs.org'
44+
3245
- name: Publish to npm
3346
shell: bash
3447
run: |
3548
if [[ "${{ github.event.release.tag_name }}" == *"beta"* ]]; then
36-
npm publish --provenance --access public --tag beta
49+
npm publish --ignore-scripts --provenance --access public --tag beta
3750
else
38-
npm publish --provenance --access public
51+
npm publish --ignore-scripts --provenance --access public
3952
fi

0 commit comments

Comments
 (0)