File tree Expand file tree Collapse file tree 9 files changed +706
-11
lines changed Expand file tree Collapse file tree 9 files changed +706
-11
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " nsite-gateway " : minor
3
+ ---
4
+
5
+ Change build folder
Original file line number Diff line number Diff line change
1
+ name : Build SEA
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+
8
+ concurrency : ${{ github.workflow }}-${{ github.ref }}
9
+
10
+ jobs :
11
+ sea-action :
12
+ name : Build SEA
13
+ strategy :
14
+ matrix :
15
+ os : [ubuntu-latest]
16
+ runs-on : ${{ matrix.os }}
17
+ steps :
18
+ - name : Checkout
19
+ id : checkout
20
+ uses : actions/checkout@v4
21
+
22
+ - name : Setup Node.js
23
+ id : setup-node
24
+ uses : actions/setup-node@v4
25
+ with :
26
+ node-version-file : .nvmrc
27
+ cache : pnpm
28
+
29
+ - name : Install Dependencies
30
+ run : pnpm install
31
+
32
+ - name : Build and bundle
33
+ run : pnpm build && pnpm bundle
34
+
35
+ - name : Find Node
36
+ id : find-node
37
+ run : echo "node=$(node -e 'console.log(process.argv[0]);')" >>
38
+ $env:GITHUB_OUTPUT
39
+
40
+ - name : SEA
41
+ id : sea
42
+ uses : bryopsida/node-sea-action@v1
43
+ with :
44
+ working-dir : .
45
+ output-dir : build/release
46
+ executable-name : nsite-gateway
47
+ sea-config-path : sea-config.json
48
+ node-path : ${{ steps.find-node.outputs.node }}
49
+
50
+ - uses : actions/upload-artifact@v4
51
+ with :
52
+ name : ${{ matrix.os }}-sea
53
+ path : build/release
54
+ if-no-files-found : error
Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ jobs:
18
18
19
19
- uses : pnpm/action-setup@v4
20
20
21
- - name : Setup Node.js 20
21
+ - name : Setup Node.js
22
22
uses : actions/setup-node@v4
23
23
with :
24
- node-version : 20
24
+ node-version-file : .nvmrc
25
25
cache : " pnpm"
26
26
27
27
- name : Install Dependencies
Original file line number Diff line number Diff line change @@ -26,10 +26,10 @@ jobs:
26
26
27
27
- uses : pnpm/action-setup@v4
28
28
29
- - name : Setup Node.js 20
29
+ - name : Setup Node.js
30
30
uses : actions/setup-node@v4
31
31
with :
32
- node-version : 20
32
+ node-version-file : .nvmrc
33
33
cache : " pnpm"
34
34
35
35
- name : Install Dependencies
Original file line number Diff line number Diff line change 4
4
data
5
5
.netrc
6
6
screenshots
7
+ dist
Original file line number Diff line number Diff line change 2
2
"name" : " nsite-gateway" ,
3
3
"version" : " 0.7.0" ,
4
4
"description" : " A blossom server implementation written in Typescript" ,
5
- "main" : " build /index.js" ,
5
+ "main" : " dist /index.js" ,
6
6
"type" : " module" ,
7
7
"author" : " hzrd149" ,
8
8
"license" : " MIT" ,
9
9
"scripts" : {
10
- "start" : " node build /index.js" ,
10
+ "start" : " node dist /index.js" ,
11
11
"prepack" : " tsc" ,
12
12
"build" : " tsc" ,
13
13
"dev" : " nodemon -i '**/data/**' --exec 'node' --loader @swc-node/register/esm src/index.ts" ,
14
+ "bundle" : " esbuild --bundle dist/index.js --format=esm --platform=node --outfile=build/bundle.mjs" ,
14
15
"format" : " prettier -w ."
15
16
},
16
- "bin" : " build /index.js" ,
17
+ "bin" : " dist /index.js" ,
17
18
"files" : [
18
- " build " ,
19
+ " dist " ,
19
20
" public"
20
21
],
21
22
"dependencies" : {
57
58
"@types/node" : " ^20.17.24" ,
58
59
"@types/proxy-from-env" : " ^1.0.4" ,
59
60
"@types/ws" : " ^8.18.0" ,
61
+ "esbuild" : " ^0.25.1" ,
60
62
"nodemon" : " ^3.1.9" ,
63
+ "pkg" : " ^5.8.1" ,
61
64
"prettier" : " ^3.5.3" ,
62
65
"typescript" : " ^5.8.2"
63
66
},
You can’t perform that action at this time.
0 commit comments