mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 21:20:29 +08:00
update depends and remove artifact
This commit is contained in:
parent
9aec378756
commit
db71bc3258
16
package.json
16
package.json
@ -41,7 +41,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@dnd-kit/core": "^6.1.0",
|
"@dnd-kit/core": "^6.1.0",
|
||||||
"@dnd-kit/sortable": "^8.0.0",
|
"@dnd-kit/sortable": "^10.0.0",
|
||||||
"@dnd-kit/utilities": "^3.2.2",
|
"@dnd-kit/utilities": "^3.2.2",
|
||||||
"@electron-toolkit/eslint-config-prettier": "^2.0.0",
|
"@electron-toolkit/eslint-config-prettier": "^2.0.0",
|
||||||
"@electron-toolkit/eslint-config-ts": "^2.0.0",
|
"@electron-toolkit/eslint-config-ts": "^2.0.0",
|
||||||
@ -50,8 +50,8 @@
|
|||||||
"@types/express": "^5.0.0",
|
"@types/express": "^5.0.0",
|
||||||
"@types/node": "^22.9.0",
|
"@types/node": "^22.9.0",
|
||||||
"@types/pubsub-js": "^1.8.6",
|
"@types/pubsub-js": "^1.8.6",
|
||||||
"@types/react": "^18.3.12",
|
"@types/react": "^19.0.4",
|
||||||
"@types/react-dom": "^18.3.1",
|
"@types/react-dom": "^19.0.2",
|
||||||
"@types/ws": "^8.5.13",
|
"@types/ws": "^8.5.13",
|
||||||
"@vitejs/plugin-react": "^4.3.3",
|
"@vitejs/plugin-react": "^4.3.3",
|
||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
@ -73,13 +73,13 @@
|
|||||||
"postcss": "^8.4.47",
|
"postcss": "^8.4.47",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"pubsub-js": "^1.9.5",
|
"pubsub-js": "^1.9.5",
|
||||||
"react": "^18.3.1",
|
"react": "^19.0.0",
|
||||||
"react-dom": "^18.3.1",
|
"react-dom": "^19.0.0",
|
||||||
"react-error-boundary": "^4.1.2",
|
"react-error-boundary": "^5.0.0",
|
||||||
"react-icons": "^5.3.0",
|
"react-icons": "^5.3.0",
|
||||||
"react-markdown": "^9.0.1",
|
"react-markdown": "^9.0.1",
|
||||||
"react-monaco-editor": "^0.56.2",
|
"react-monaco-editor": "^0.56.2",
|
||||||
"react-router-dom": "^6.28.0",
|
"react-router-dom": "^7.1.1",
|
||||||
"react-virtuoso": "^4.12.0",
|
"react-virtuoso": "^4.12.0",
|
||||||
"recharts": "^2.13.3",
|
"recharts": "^2.13.3",
|
||||||
"swr": "^2.2.5",
|
"swr": "^2.2.5",
|
||||||
@ -88,7 +88,7 @@
|
|||||||
"tsx": "^4.19.2",
|
"tsx": "^4.19.2",
|
||||||
"types-pac": "^1.0.3",
|
"types-pac": "^1.0.3",
|
||||||
"typescript": "^5.6.3",
|
"typescript": "^5.6.3",
|
||||||
"vite": "^5.4.10",
|
"vite": "^6.0.7",
|
||||||
"vite-plugin-monaco-editor": "^1.1.0"
|
"vite-plugin-monaco-editor": "^1.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
5256
pnpm-lock.yaml
generated
5256
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1,150 +0,0 @@
|
|||||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
||||||
import fs from 'fs'
|
|
||||||
import axios from 'axios'
|
|
||||||
import path from 'path'
|
|
||||||
import FormData from 'form-data'
|
|
||||||
import { execSync } from 'child_process'
|
|
||||||
|
|
||||||
const CHAT_ID = '@MihomoPartyCi'
|
|
||||||
const GITHUB_WORKSPACE = process.env.GITHUB_WORKSPACE
|
|
||||||
const ARTIFACT_TARGET = process.env.ARTIFACT_TARGET
|
|
||||||
const pkg = fs.readFileSync('package.json', 'utf-8')
|
|
||||||
const { version } = JSON.parse(pkg)
|
|
||||||
const hash = execSync('git rev-parse --short HEAD').toString().trim()
|
|
||||||
const message = execSync('git log -1 --pretty=%B').toString().trim()
|
|
||||||
|
|
||||||
switch (ARTIFACT_TARGET) {
|
|
||||||
case 'windows': {
|
|
||||||
const windowsFiles = [
|
|
||||||
path.join(GITHUB_WORKSPACE, `mihomo-party-windows-${version}-x64-setup.exe`),
|
|
||||||
path.join(GITHUB_WORKSPACE, `mihomo-party-windows-${version}-x64-portable.7z`),
|
|
||||||
path.join(GITHUB_WORKSPACE, `mihomo-party-windows-${version}-ia32-setup.exe`),
|
|
||||||
path.join(GITHUB_WORKSPACE, `mihomo-party-windows-${version}-ia32-portable.7z`),
|
|
||||||
path.join(GITHUB_WORKSPACE, `mihomo-party-windows-${version}-arm64-setup.exe`),
|
|
||||||
path.join(GITHUB_WORKSPACE, `mihomo-party-windows-${version}-arm64-portable.7z`)
|
|
||||||
]
|
|
||||||
const windowsMedia = windowsFiles.map((file, index) => ({
|
|
||||||
type: 'document',
|
|
||||||
media: `attach://file${index}`
|
|
||||||
}))
|
|
||||||
windowsMedia[windowsMedia.length - 1].caption = `#${hash} #Windows10 #Windows11\n${message}`
|
|
||||||
const windowsForm = new FormData()
|
|
||||||
windowsForm.append('chat_id', CHAT_ID)
|
|
||||||
windowsForm.append('media', JSON.stringify(windowsMedia))
|
|
||||||
windowsFiles.forEach((file, index) => {
|
|
||||||
windowsForm.append(`file${index}`, fs.createReadStream(file))
|
|
||||||
})
|
|
||||||
await axios.post(
|
|
||||||
`http://127.0.0.1:8081/bot${process.env.TELEGRAM_BOT_TOKEN}/sendMediaGroup`,
|
|
||||||
windowsForm,
|
|
||||||
{
|
|
||||||
headers: windowsForm.getHeaders()
|
|
||||||
}
|
|
||||||
)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
case 'windows7': {
|
|
||||||
const windows7Files = [
|
|
||||||
path.join(GITHUB_WORKSPACE, `mihomo-party-win7-${version}-x64-setup.exe`),
|
|
||||||
path.join(GITHUB_WORKSPACE, `mihomo-party-win7-${version}-x64-portable.7z`),
|
|
||||||
path.join(GITHUB_WORKSPACE, `mihomo-party-win7-${version}-ia32-setup.exe`),
|
|
||||||
path.join(GITHUB_WORKSPACE, `mihomo-party-win7-${version}-ia32-portable.7z`)
|
|
||||||
]
|
|
||||||
const windows7Media = windows7Files.map((file, index) => ({
|
|
||||||
type: 'document',
|
|
||||||
media: `attach://file${index}`
|
|
||||||
}))
|
|
||||||
windows7Media[windows7Media.length - 1].caption = `#${hash} #Windows7 #Windows8\n${message}`
|
|
||||||
const windows7Form = new FormData()
|
|
||||||
windows7Form.append('chat_id', CHAT_ID)
|
|
||||||
windows7Form.append('media', JSON.stringify(windows7Media))
|
|
||||||
windows7Files.forEach((file, index) => {
|
|
||||||
windows7Form.append(`file${index}`, fs.createReadStream(file))
|
|
||||||
})
|
|
||||||
await axios.post(
|
|
||||||
`http://127.0.0.1:8081/bot${process.env.TELEGRAM_BOT_TOKEN}/sendMediaGroup`,
|
|
||||||
windows7Form,
|
|
||||||
{
|
|
||||||
headers: windows7Form.getHeaders()
|
|
||||||
}
|
|
||||||
)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
case 'macos': {
|
|
||||||
const macosFiles = [
|
|
||||||
path.join(GITHUB_WORKSPACE, `mihomo-party-macos-${version}-arm64.pkg`),
|
|
||||||
path.join(GITHUB_WORKSPACE, `mihomo-party-macos-${version}-x64.pkg`)
|
|
||||||
]
|
|
||||||
const macosMedia = macosFiles.map((file, index) => ({
|
|
||||||
type: 'document',
|
|
||||||
media: `attach://file${index}`
|
|
||||||
}))
|
|
||||||
macosMedia[macosMedia.length - 1].caption = `#${hash} #macOS11+\n${message}`
|
|
||||||
const macosForm = new FormData()
|
|
||||||
macosForm.append('chat_id', CHAT_ID)
|
|
||||||
macosForm.append('media', JSON.stringify(macosMedia))
|
|
||||||
macosFiles.forEach((file, index) => {
|
|
||||||
macosForm.append(`file${index}`, fs.createReadStream(file))
|
|
||||||
})
|
|
||||||
await axios.post(
|
|
||||||
`http://127.0.0.1:8081/bot${process.env.TELEGRAM_BOT_TOKEN}/sendMediaGroup`,
|
|
||||||
macosForm,
|
|
||||||
{
|
|
||||||
headers: macosForm.getHeaders()
|
|
||||||
}
|
|
||||||
)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
case 'macos10': {
|
|
||||||
const macos10Files = [
|
|
||||||
path.join(GITHUB_WORKSPACE, `mihomo-party-catalina-${version}-arm64.pkg`),
|
|
||||||
path.join(GITHUB_WORKSPACE, `mihomo-party-catalina-${version}-x64.pkg`)
|
|
||||||
]
|
|
||||||
const macos10Media = macos10Files.map((file, index) => ({
|
|
||||||
type: 'document',
|
|
||||||
media: `attach://file${index}`
|
|
||||||
}))
|
|
||||||
macos10Media[macos10Media.length - 1].caption = `#${hash} #macOS10+\n${message}`
|
|
||||||
const macos10Form = new FormData()
|
|
||||||
macos10Form.append('chat_id', CHAT_ID)
|
|
||||||
macos10Form.append('media', JSON.stringify(macos10Media))
|
|
||||||
macos10Files.forEach((file, index) => {
|
|
||||||
macos10Form.append(`file${index}`, fs.createReadStream(file))
|
|
||||||
})
|
|
||||||
await axios.post(
|
|
||||||
`http://127.0.0.1:8081/bot${process.env.TELEGRAM_BOT_TOKEN}/sendMediaGroup`,
|
|
||||||
macos10Form,
|
|
||||||
{
|
|
||||||
headers: macos10Form.getHeaders()
|
|
||||||
}
|
|
||||||
)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
case 'linux': {
|
|
||||||
const linuxFiles = [
|
|
||||||
path.join(GITHUB_WORKSPACE, `mihomo-party-linux-${version}-aarch64.rpm`),
|
|
||||||
path.join(GITHUB_WORKSPACE, `mihomo-party-linux-${version}-arm64.deb`),
|
|
||||||
path.join(GITHUB_WORKSPACE, `mihomo-party-linux-${version}-x86_64.rpm`),
|
|
||||||
path.join(GITHUB_WORKSPACE, `mihomo-party-linux-${version}-amd64.deb`)
|
|
||||||
]
|
|
||||||
const linuxMedia = linuxFiles.map((file, index) => ({
|
|
||||||
type: 'document',
|
|
||||||
media: `attach://file${index}`
|
|
||||||
}))
|
|
||||||
linuxMedia[linuxMedia.length - 1].caption = `#${hash} #Linux\n${message}`
|
|
||||||
const linuxForm = new FormData()
|
|
||||||
linuxForm.append('chat_id', CHAT_ID)
|
|
||||||
linuxForm.append('media', JSON.stringify(linuxMedia))
|
|
||||||
linuxFiles.forEach((file, index) => {
|
|
||||||
linuxForm.append(`file${index}`, fs.createReadStream(file))
|
|
||||||
})
|
|
||||||
await axios.post(
|
|
||||||
`http://127.0.0.1:8081/bot${process.env.TELEGRAM_BOT_TOKEN}/sendMediaGroup`,
|
|
||||||
linuxForm,
|
|
||||||
{
|
|
||||||
headers: linuxForm.getHeaders()
|
|
||||||
}
|
|
||||||
)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user