Skip to content

Commit 1475030

Browse files
authored
Create config of Github Actions
1 parent 4a515f6 commit 1475030

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.github/workflows/webpack.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: NodeJS with Webpack
2+
3+
on:
4+
push:
5+
branches: [ "*" ]
6+
pull_request:
7+
branches: [ "*" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Use Node.js current
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: current
20+
21+
- name: Build
22+
run: |
23+
npm install
24+
npm run build

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"test:fix": "npm run test -- --fix",
99
"start": "npx webpack --config webpack.config.js --watch --mode=development",
1010
"build:app": "npx webpack --config webpack.config.js --mode=production",
11-
"build:cmd": "cat src/miui_cleaner_cmd/main.cmd | iconv --from-code=utf-8 --to-code=gbk > dist/miui_cleaner_cmd/main.cmd",
11+
"build:cmd": "mkdir -p dist/miui_cleaner_cmd && (cat src/miui_cleaner_cmd/main.cmd | iconv --from-code=utf-8 --to-code=gbk > dist/miui_cleaner_cmd/main.cmd)",
1212
"build:pull": "adb pull /sdcard/auto.js/miui_cleaner_app/dist/MiuiCleaner_v2022.9.21.4.apk ./dist/miui_cleaner_app/",
1313
"build": "node project.js && npm run build:app && npm run build:cmd",
1414
"deploy:clear": "rm -rf ./dist/miui_cleaner_app/*.map && rm -rf ./dist/miui_cleaner_app/*.apk",

0 commit comments

Comments
 (0)