Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Commit aa3ad00

Browse files
committed
Build standalone binaries during release
1 parent b173974 commit aa3ad00

File tree

4 files changed

+375
-24
lines changed

4 files changed

+375
-24
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,4 @@ dist
104104
.tern-port
105105

106106
*.generated.*
107+
cli-binaries

package.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
"require": "./cjs-wrapper.js",
1919
"import": "./dist/index.mjs",
2020
"types": "./dist/index.d.ts"
21+
},
22+
"./cli": {
23+
"require": "./dist/cli/index.js",
24+
"import": "./dist/cli/index.js",
25+
"types": "./dist/cli/index.d.ts"
2126
}
2227
},
2328
"files": [
@@ -47,6 +52,7 @@
4752
"lint-staged": "12.3.1",
4853
"nanoid": "3.2.0",
4954
"pgknexlove": "1.1.21",
55+
"pkg": "5.5.2",
5056
"prettier": "2.5.1",
5157
"testcontainers": "8.2.0",
5258
"ts-json-schema-generator": "0.98.0",
@@ -59,12 +65,17 @@
5965
"lint-staged": {
6066
"*.{ts,css,md}": "prettier --write"
6167
},
68+
"pkg": {
69+
"outputPath": "cli-binaries",
70+
"assets": "./dist/cli/commands/**/*"
71+
},
6272
"scripts": {
6373
"prepare": "husky install",
64-
"prepack": "npm run build",
74+
"prepack": "npm run build && npm run pack:cli",
6575
"build:package": "tsup",
6676
"build:docs": "typedoc",
6777
"build": "npm run build:package && npm run build:docs",
78+
"pack:cli": "pkg -c package.json dist/cli/entry.js",
6879
"format": "prettier --write .",
6980
"format:check": "prettier --check .",
7081
"build:json-response-schemas": "ts-json-schema-generator --path src/types/route-responses.ts -o src/types/route-responses.generated.json && ts-json-schema-generator --path src/types/models.ts -o src/types/models.generated.json",

release.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,12 @@ module.exports = {
1212
"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
1313
},
1414
],
15+
["@semantic-release/github", {
16+
"assets": [
17+
{"path": "cli-binaries/seamapi-linux", "label": "seamapi-linux-x64-${nextRelease.gitTag}"},
18+
{"path": "cli-binaries/seamapi-macos", "label": "seamapi-macos-x64-${nextRelease.gitTag}"},
19+
{"path": "cli-binaries/seamapi-win.exe", "label": "seamapi-win-x64-${nextRelease.gitTag}.exe"},
20+
]
21+
}],
1522
],
1623
}

0 commit comments

Comments
 (0)