File tree Expand file tree Collapse file tree 3 files changed +24
-19
lines changed
Expand file tree Collapse file tree 3 files changed +24
-19
lines changed Original file line number Diff line number Diff line change 7070 # echo "skip=false" >> $GITHUB_OUTPUT
7171 # fi
7272
73- - name : Build project
73+ - name : Build Lib
7474 if : steps.check-update.outputs.skip != 'true'
75- run : pnpm run build
75+ run : pnpm run build:lib
76+
77+ - name : Build UI
78+ if : steps.check-update.outputs.skip != 'true'
79+ run : pnpm run build:app --outDir dist/ui
80+
81+ - name : Upload build artifacts
82+ if : steps.check-update.outputs.skip != 'true'
83+ uses : actions/upload-artifact@v4
84+ with :
85+ name : usb-ids-build-${{ github.run_number }}
86+ path : |
87+ dist/
88+ usb.ids.json
89+ usb.ids.version.json
90+ retention-days : 30
7691
7792 - name : Update package.json version
7893 if : steps.check-update.outputs.skip != 'true'
Original file line number Diff line number Diff line change @@ -42,22 +42,14 @@ jobs:
4242 - name : Install dependencies
4343 run : pnpm install
4444
45- - name : Generate USB.IDS data
46- run : |
47- pnpm run build
48- node bin/cli.cjs update
45+ - name : Fetch USB IDs
46+ run : pnpm run fetch-usb-ids
4947
50- - name : Build
51- run : pnpm run build
48+ - name : Build Web App
49+ run : pnpm run build:app
5250 env :
5351 VITE_BASE_PATH : /usb.ids/
5452
55- - name : Copy USB.IDS files to dist
56- run : |
57- cp usb.ids.json dist/usb.ids.json
58- cp usb.ids.version.json dist/usb.ids.version.json
59- cp usb.ids dist/usb.ids
60-
6153 - name : Setup Pages
6254 uses : actions/configure-pages@v5
6355 - name : Upload artifact
Original file line number Diff line number Diff line change 4242 "scripts" : {
4343 "preinstall" : " npx only-allow pnpm" ,
4444 "dev:app" : " vite" ,
45- "build:app" : " vite build --outDir dist/ui " ,
45+ "build:app" : " vite build" ,
4646 "dev:lib" : " tsdown --watch" ,
4747 "build:lib" : " tsdown" ,
4848 "lint" : " eslint" ,
4949 "lint:fix" : " eslint --fix" ,
50- "fetch-usb-ids" : " node ./bin/cli.cjs fetch" ,
51- "version-info" : " node ./bin/cli.cjs version" ,
52- "check-update" : " node ./bin/cli.cjs check" ,
53- "ui" : " tsx src/cli.ts ui" ,
50+ "fetch-usb-ids" : " tsx src/cli.ts fetch" ,
51+ "dev:ui" : " tsx src/cli.ts ui" ,
5452 "release" : " bumpp && pnpm publish" ,
5553 "start" : " tsx src/index.ts" ,
5654 "test" : " vitest run" ,
You can’t perform that action at this time.
0 commit comments