[feat] fullfil tasks to minify manual actions

This commit is contained in:
2025-11-09 00:30:26 +08:00
parent 4b7735575a
commit 812bc64b6f
6 changed files with 296 additions and 13 deletions

108
.vscode/tasks.json vendored
View File

@@ -4,19 +4,117 @@
"version": "2.0.0",
"tasks": [
{
"label": "Dev Tauri",
"label": "🚀 Dev Tauri",
"type": "shell",
"command": "bun tauri dev",
"group": {
"kind": "build",
"isDefault": false
},
"presentation": {
"reveal": "always",
"panel": "new"
}
},
{
"label": "Build Tauri to nsis installer",
"label": "📦 Build: Release (NSIS)",
"type": "shell",
"command": "bun tauri build -b nsis",
"command": "& .\\.tauri\\set-env.ps1; bun tauri build -b nsis",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new"
}
},
{
"label": "Build Tauri",
"label": "📦 Build: Release (All)",
"type": "shell",
"command": "bun tauri build",
"command": "& .\\.tauri\\set-env.ps1; bun tauri build",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new"
}
},
{
"label": "⚡ Build: Fast (Dev Profile)",
"type": "shell",
"command": "& .\\.tauri\\set-env.ps1; bun tauri build -b nsis -- --profile dev",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new"
}
},
{
"label": "⚡ Build: Fast Prod (Fast-Release Profile)",
"type": "shell",
"command": "& .\\.tauri\\set-env.ps1; bun tauri build -b nsis -- --profile fast-release",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new"
}
},
{
"label": "📦 Build: Release + Rename + Gen Latest",
"type": "shell",
"command": "& .\\.tauri\\set-env.ps1; bun tauri build -b nsis; if ($LASTEXITCODE -eq 0) { node scripts/generate-latest-json.js --base-url https://github.com/plsgo/cstb/releases --rename }",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new"
}
},
{
"label": "⚡ Build: Fast + Rename + Gen Latest",
"type": "shell",
"command": "& .\\.tauri\\set-env.ps1; bun tauri build -b nsis -- --profile dev; if ($LASTEXITCODE -eq 0) { node scripts/generate-latest-json.js --base-url https://github.com/plsgo/cstb/releases --target debug --rename }",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new"
}
},
{
"label": "⚡ Build: Fast Prod + Rename + Gen Latest",
"type": "shell",
"command": "& .\\.tauri\\set-env.ps1; bun tauri build -b nsis -- --profile fast-release; if ($LASTEXITCODE -eq 0) { node scripts/generate-latest-json.js --base-url https://github.com/plsgo/cstb/releases --target fast-release --rename }",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new"
}
},
{
"label": "🔄 Rename Build Artifacts",
"type": "shell",
"command": "node scripts/rename-build-artifacts.js --target release",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new"
}
},
{
"label": "📄 Generate Latest JSON",
"type": "shell",
"command": "node scripts/generate-latest-json.js --base-url https://github.com/plsgo/cstb/releases",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new"
}
},
{
"label": "📄 Generate Latest JSON (with Rename)",
"type": "shell",
"command": "node scripts/generate-latest-json.js --base-url https://github.com/plsgo/cstb/releases --rename",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new"
}
}
]
}