Skip to content

Commit e2ea229

Browse files
committed
fix: github actions release pipeline for binary releases
1 parent 683b4cd commit e2ea229

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,29 @@ jobs:
2929
- name: Build JS
3030
run: npm run build
3131

32-
- name: Package binary (pkg)
32+
- name: Bundle for pkg (CJS)
33+
run: |
34+
npx --yes esbuild@latest dist/index.js \
35+
--bundle \
36+
--platform=node \
37+
--format=cjs \
38+
--target=node20 \
39+
--outfile=dist/bundle.cjs
40+
41+
- name: Package (pkg)
3342
run: |
3443
npx --yes @yao-pkg/pkg@latest \
3544
-t node20-linux-x64 \
3645
--output dist/omniboard-linux-x64 \
37-
dist/index.js
38-
46+
dist/bundle.cjs
47+
3948
cd dist
4049
tar -cvzf omniboard-linux-x64.tar.gz omniboard-linux-x64
4150
51+
- name: Smoke test
52+
run: |
53+
./dist/omniboard-linux-x64 --help
54+
4255
- name: Prepare changelog
4356
run: npx ts-node ./tooling/release-changelog-extractor.ts
4457

0 commit comments

Comments
 (0)