feat: 添加发布脚本,添加electron-updater依赖

This commit is contained in:
2025-09-08 22:42:56 +08:00
parent 41bb159542
commit a0c5334f57
2 changed files with 65 additions and 17 deletions

View File

@@ -9,7 +9,8 @@
"electron-dev": "wait-on http://localhost:5173 && cross-env VITE_DEV_SERVER_URL=http://localhost:5173 electron .",
"build:main": "tsc -p tsconfig.electron.json",
"build": "vite build && yarn build:main && electron-builder",
"web": "vite"
"web": "vite",
"release": "vite build && yarn build:main && electron-builder --win --publish always"
},
"build": {
"asar": true,
@@ -20,29 +21,37 @@
"appId": "xyz.automaa.frontend",
"productName": "AUTO_MAA",
"files": [
"dist",
"dist-electron",
"public",
"!src/assets/*"
"dist/**",
"dist-electron/**",
"public/**",
"!src/**",
"!**/*.map"
],
"publish": [
{
"provider": "github",
"owner": "DLmaster_361",
"repo": "AUTO_MAA"
}
],
"extraResources": [
{
"from": "src/assets",
"to": "assets",
"filter": []
}
{ "from": "src/assets", "to": "assets", "filter": ["**/*"] }
],
"win": {
"requestedExecutionLevel": "requireAdministrator",
"target": "dir",
"target": [
{ "target": "nsis", "arch": ["x64"] }
],
"icon": "public/AUTO-MAS.ico",
"artifactName": "AUTO_MAA.exe"
"artifactName": "AUTO_MAA-Setup-${version}-${arch}.${ext}"
},
"mac": {
"icon": "public/AUTO-MAS.ico"
},
"linux": {
"icon": "public/AUTO-MAS.ico"
"nsis": {
"oneClick": false,
"perMachine": true,
"allowToChangeInstallationDirectory": true,
"createDesktopShortcut": true,
"shortcutName": "AUTO_MAA",
"differentialPackage": true
}
},
"dependencies": {
@@ -54,6 +63,7 @@
"axios": "^1.11.0",
"dayjs": "^1.11.13",
"electron-log": "^5.4.3",
"electron-updater": "6.6.2",
"form-data": "^4.0.4",
"markdown-it": "^14.1.0",
"vue": "^3.5.17",

View File

@@ -2478,6 +2478,22 @@ __metadata:
languageName: node
linkType: hard
"electron-updater@npm:6.6.2":
version: 6.6.2
resolution: "electron-updater@npm:6.6.2"
dependencies:
builder-util-runtime: "npm:9.3.1"
fs-extra: "npm:^10.1.0"
js-yaml: "npm:^4.1.0"
lazy-val: "npm:^1.0.5"
lodash.escaperegexp: "npm:^4.1.2"
lodash.isequal: "npm:^4.5.0"
semver: "npm:^7.6.3"
tiny-typed-emitter: "npm:^2.1.0"
checksum: 10c0/2b9ae5583b95f6772c4a2515ddba7ba52b65460ab81f09ae4f0b97c7e3d7b7e3d9426775eb9a53d3193bd4c3d5466bf30827c1a6ee75e4aca739c647f6ac46ff
languageName: node
linkType: hard
"electron@npm:^37.2.5":
version: 37.4.0
resolution: "electron@npm:37.4.0"
@@ -3075,6 +3091,7 @@ __metadata:
electron: "npm:^37.2.5"
electron-builder: "npm:^26.0.12"
electron-log: "npm:^5.4.3"
electron-updater: "npm:6.6.2"
eslint: "npm:^9.32.0"
eslint-config-prettier: "npm:^10.1.8"
eslint-plugin-prettier: "npm:^5.5.3"
@@ -3872,6 +3889,20 @@ __metadata:
languageName: node
linkType: hard
"lodash.escaperegexp@npm:^4.1.2":
version: 4.1.2
resolution: "lodash.escaperegexp@npm:4.1.2"
checksum: 10c0/484ad4067fa9119bb0f7c19a36ab143d0173a081314993fe977bd00cf2a3c6a487ce417a10f6bac598d968364f992153315f0dbe25c9e38e3eb7581dd333e087
languageName: node
linkType: hard
"lodash.isequal@npm:^4.5.0":
version: 4.5.0
resolution: "lodash.isequal@npm:4.5.0"
checksum: 10c0/dfdb2356db19631a4b445d5f37868a095e2402292d59539a987f134a8778c62a2810c2452d11ae9e6dcac71fc9de40a6fedcb20e2952a15b431ad8b29e50e28f
languageName: node
linkType: hard
"lodash.merge@npm:^4.6.2":
version: 4.6.2
resolution: "lodash.merge@npm:4.6.2"
@@ -5374,6 +5405,13 @@ __metadata:
languageName: node
linkType: hard
"tiny-typed-emitter@npm:^2.1.0":
version: 2.1.0
resolution: "tiny-typed-emitter@npm:2.1.0"
checksum: 10c0/522bed4c579ee7ee16548540cb693a3d098b137496110f5a74bff970b54187e6b7343a359b703e33f77c5b4b90ec6cebc0d0ec3dbdf1bd418723c5c3ce36d8a2
languageName: node
linkType: hard
"tinyglobby@npm:^0.2.12, tinyglobby@npm:^0.2.14":
version: 0.2.14
resolution: "tinyglobby@npm:0.2.14"