mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 21:20:29 +08:00
1.5.13
This commit is contained in:
parent
8abce96232
commit
e3a99c84c7
226
.github/workflows/build.yml
vendored
226
.github/workflows/build.yml
vendored
@ -1,5 +1,11 @@
|
||||
name: Build
|
||||
permissions: write-all
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Tag version to release"
|
||||
required: false
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
@ -10,171 +16,62 @@ on:
|
||||
- '.github/ISSUE_TEMPLATE/**'
|
||||
- '.github/workflows/issues.yml'
|
||||
|
||||
permissions: write-all
|
||||
|
||||
jobs:
|
||||
windows:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch:
|
||||
- x64
|
||||
- ia32
|
||||
- arm64
|
||||
runs-on: windows-latest
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
arch: [x64, arm64]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup pnpm
|
||||
run: npm install -g pnpm
|
||||
- name: Install Dependencies
|
||||
env:
|
||||
npm_config_arch: ${{ matrix.arch }}
|
||||
npm_config_target_arch: ${{ matrix.arch }}
|
||||
run: |
|
||||
pnpm install
|
||||
pnpm add @mihomo-party/sysproxy-win32-${{ matrix.arch }}-msvc
|
||||
pnpm prepare --${{ matrix.arch }}
|
||||
- name: Build
|
||||
env:
|
||||
npm_config_arch: ${{ matrix.arch }}
|
||||
npm_config_target_arch: ${{ matrix.arch }}
|
||||
run: pnpm build:win --${{ matrix.arch }}
|
||||
- name: Add Portable Flag
|
||||
run: |
|
||||
New-Item -Path "PORTABLE" -ItemType File
|
||||
Get-ChildItem dist/*portable.7z | ForEach-Object {
|
||||
7z a $_.FullName PORTABLE
|
||||
}
|
||||
- name: Generate checksums
|
||||
run: pnpm checksum setup.exe portable.7z
|
||||
- name: Upload Artifacts
|
||||
if: startsWith(github.ref, 'refs/heads/')
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Windows ${{ matrix.arch }}
|
||||
path: |
|
||||
dist/*.sha256
|
||||
dist/*setup.exe
|
||||
dist/*portable.7z
|
||||
if-no-files-found: error
|
||||
- name: Publish Release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
dist/*.sha256
|
||||
dist/*setup.exe
|
||||
dist/*portable.7z
|
||||
body_path: changelog.md
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
linux:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch:
|
||||
- x64
|
||||
- arm64
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup pnpm
|
||||
run: npm install -g pnpm
|
||||
- name: Install Dependencies
|
||||
env:
|
||||
npm_config_arch: ${{ matrix.arch }}
|
||||
npm_config_target_arch: ${{ matrix.arch }}
|
||||
run: |
|
||||
pnpm install
|
||||
pnpm add @mihomo-party/sysproxy-linux-${{ matrix.arch }}-gnu
|
||||
sed -i "s/productName: Mihomo Party/productName: mihomo-party/" electron-builder.yml
|
||||
pnpm prepare --${{ matrix.arch }}
|
||||
- name: Build
|
||||
env:
|
||||
npm_config_arch: ${{ matrix.arch }}
|
||||
npm_config_target_arch: ${{ matrix.arch }}
|
||||
run: pnpm build:linux --${{ matrix.arch }}
|
||||
- name: Generate checksums
|
||||
run: pnpm checksum .deb .rpm
|
||||
- name: Upload Artifacts
|
||||
if: startsWith(github.ref, 'refs/heads/')
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Linux ${{ matrix.arch }}
|
||||
path: |
|
||||
dist/*.sha256
|
||||
dist/*.deb
|
||||
dist/*.rpm
|
||||
if-no-files-found: error
|
||||
- name: Publish Release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
dist/*.sha256
|
||||
dist/*.deb
|
||||
dist/*.rpm
|
||||
body_path: changelog.md
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
macos:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch:
|
||||
- x64
|
||||
- arm64
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup pnpm
|
||||
run: npm install -g pnpm
|
||||
- name: Install Dependencies
|
||||
- name: Install Dependencies and Prepare
|
||||
env:
|
||||
npm_config_arch: ${{ matrix.arch }}
|
||||
npm_config_target_arch: ${{ matrix.arch }}
|
||||
run: |
|
||||
pnpm install
|
||||
pnpm add @mihomo-party/sysproxy-darwin-${{ matrix.arch }}
|
||||
pnpm add @mihomo-party/sysproxy-${{ matrix.os == 'windows-latest' && 'win32' || matrix.os == 'ubuntu-latest' && 'linux' || 'darwin' }}-${{ matrix.arch }}${{ matrix.os == 'ubuntu-latest' && '-gnu' || matrix.os == 'windows-latest' && '-msvc' || '' }}
|
||||
pnpm prepare --${{ matrix.arch }}
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
npm_config_arch: ${{ matrix.arch }}
|
||||
npm_config_target_arch: ${{ matrix.arch }}
|
||||
run: |
|
||||
chmod +x build/pkg-scripts/postinstall
|
||||
pnpm build:mac --${{ matrix.arch }}
|
||||
- name: Generate checksums
|
||||
run: pnpm checksum .pkg
|
||||
pnpm build:${{ matrix.os == 'windows-latest' && 'win' || matrix.os == 'ubuntu-latest' && 'linux' || 'mac' }} --${{ matrix.arch }}
|
||||
|
||||
- name: Add Portable Flag
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: |
|
||||
New-Item -Path "PORTABLE" -ItemType File
|
||||
Get-ChildItem dist/*portable.7z | ForEach-Object {
|
||||
7z a $_.FullName PORTABLE
|
||||
}
|
||||
|
||||
- name: Generate latest.yml
|
||||
run: pnpm updater
|
||||
|
||||
- name: Upload Artifacts
|
||||
if: startsWith(github.ref, 'refs/heads/')
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: MacOS ${{ matrix.arch }}
|
||||
name: ${{ matrix.os }}-${{ matrix.arch }}
|
||||
path: |
|
||||
dist/*.sha256
|
||||
dist/*.pkg
|
||||
if-no-files-found: error
|
||||
- name: Publish Release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
dist/*.sha256
|
||||
dist/*.pkg
|
||||
body_path: changelog.md
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
dist/mihomo-party-*
|
||||
latest.yml
|
||||
changelog.md
|
||||
|
||||
artifact:
|
||||
if: startsWith(github.ref, 'refs/heads/')
|
||||
needs: [windows, linux, macos]
|
||||
pre-release:
|
||||
if: startsWith(github.ref, 'refs/heads/') || (github.event_name == 'workflow_dispatch' && github.event.inputs.version == '')
|
||||
needs: [build]
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
group: artifact
|
||||
cancel-in-progress: false
|
||||
steps:
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
@ -182,31 +79,52 @@ jobs:
|
||||
path: bin/
|
||||
merge-multiple: true
|
||||
|
||||
- name: Upload Prerelease
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: ${{ success() }}
|
||||
- name: Delete Current
|
||||
uses: 8Mi-Tech/delete-release-assets-action@main
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: pre-release
|
||||
deleteOnlyFromDrafts: false
|
||||
|
||||
- name: Publish Prerelease
|
||||
if: success()
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: pre-release
|
||||
files: |
|
||||
bin/*
|
||||
bin/latest.yml
|
||||
bin/dist/*
|
||||
prerelease: true
|
||||
|
||||
updater:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
needs: [windows, macos, linux]
|
||||
release:
|
||||
if: startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch' && github.event.inputs.version != '')
|
||||
needs: [build]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup pnpm
|
||||
run: npm install -g pnpm
|
||||
- name: Install Dependencies
|
||||
run: pnpm install
|
||||
- name: Generate latest.yml
|
||||
run: pnpm updater
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: bin/
|
||||
merge-multiple: true
|
||||
|
||||
- name: Debug event inputs
|
||||
run: |
|
||||
echo "github.ref: ${{ github.ref }}"
|
||||
echo "github.event_name: ${{ github.event_name }}"
|
||||
echo "github.event.inputs.version: ${{ github.event.inputs.version }}"
|
||||
|
||||
- name: Delete Current
|
||||
uses: 8Mi-Tech/delete-release-assets-action@main
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: ${{ github.event.inputs.version != '' && github.event.inputs.version || github.ref }}
|
||||
deleteOnlyFromDrafts: false
|
||||
|
||||
- name: Publish Release
|
||||
if: success()
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: latest.yml
|
||||
body_path: changelog.md
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag_name: ${{ github.event.inputs.version != '' && github.event.inputs.version || github.ref }}
|
||||
body_path: bin/changelog.md
|
||||
files: |
|
||||
bin/latest.yml
|
||||
bin/dist/*
|
||||
@ -7,9 +7,9 @@
|
||||
|
||||
### Features
|
||||
|
||||
- 支持编辑/查看外部资源
|
||||
- 支持重置应用
|
||||
- 添加出站接口查看
|
||||
- 添加更多嗅探配置
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- 修复某些系统下应用白屏的问题
|
||||
- null
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mihomo-party",
|
||||
"version": "1.5.12",
|
||||
"version": "1.5.13",
|
||||
"description": "Mihomo Party",
|
||||
"main": "./out/main/index.js",
|
||||
"author": "mihomo-party-org",
|
||||
|
||||
@ -4,22 +4,16 @@ import { readFileSync, writeFileSync } from 'fs'
|
||||
const pkg = readFileSync('package.json', 'utf-8')
|
||||
let changelog = readFileSync('changelog.md', 'utf-8')
|
||||
const { version } = JSON.parse(pkg)
|
||||
const downloadUrl = `https://github.com/mihomo-party-org/mihomo-party/releases/download/v${version}`
|
||||
const downloadUrl = `https://github.com/xishang0128/mihomo-party/releases/download/v${version}`
|
||||
const latest = {
|
||||
version,
|
||||
changelog
|
||||
}
|
||||
|
||||
changelog += '\n### 下载地址:\n\n#### Windows10/11:\n\n'
|
||||
changelog += `- 安装版:[64位](${downloadUrl}/mihomo-party-windows-${version}-x64-setup.exe) | [32位](${downloadUrl}/mihomo-party-windows-${version}-ia32-setup.exe) | [ARM64](${downloadUrl}/mihomo-party-windows-${version}-arm64-setup.exe)\n\n`
|
||||
changelog += `- 便携版:[64位](${downloadUrl}/mihomo-party-windows-${version}-x64-portable.7z) | [32位](${downloadUrl}/mihomo-party-windows-${version}-ia32-portable.7z) | [ARM64](${downloadUrl}/mihomo-party-windows-${version}-arm64-portable.7z)\n\n`
|
||||
changelog += '\n#### Windows7/8:\n\n'
|
||||
changelog += `- 安装版:[64位](${downloadUrl}/mihomo-party-win7-${version}-x64-setup.exe) | [32位](${downloadUrl}/mihomo-party-win7-${version}-ia32-setup.exe)\n\n`
|
||||
changelog += `- 便携版:[64位](${downloadUrl}/mihomo-party-win7-${version}-x64-portable.7z) | [32位](${downloadUrl}/mihomo-party-win7-${version}-ia32-portable.7z)\n\n`
|
||||
changelog += `- 安装版:[64位](${downloadUrl}/mihomo-party-windows-${version}-x64-setup.exe) | [ARM64](${downloadUrl}/mihomo-party-windows-${version}-arm64-setup.exe)\n\n`
|
||||
changelog += '\n#### macOS 11+:\n\n'
|
||||
changelog += `- PKG:[Intel](${downloadUrl}/mihomo-party-macos-${version}-x64.pkg) | [Apple Silicon](${downloadUrl}/mihomo-party-macos-${version}-arm64.pkg)\n\n`
|
||||
changelog += '\n#### macOS 10.15+:\n\n'
|
||||
changelog += `- PKG:[Intel](${downloadUrl}/mihomo-party-catalina-${version}-x64.pkg) | [Apple Silicon](${downloadUrl}/mihomo-party-catalina-${version}-arm64.pkg)\n\n`
|
||||
changelog += '\n#### Linux:\n\n'
|
||||
changelog += `- DEB:[64位](${downloadUrl}/mihomo-party-linux-${version}-amd64.deb) | [ARM64](${downloadUrl}/mihomo-party-linux-${version}-arm64.deb)\n\n`
|
||||
changelog += `- RPM:[64位](${downloadUrl}/mihomo-party-linux-${version}-x86_64.rpm) | [ARM64](${downloadUrl}/mihomo-party-linux-${version}-aarch64.rpm)`
|
||||
|
||||
@ -13,7 +13,7 @@ import { promisify } from 'util'
|
||||
export async function checkUpdate(): Promise<IAppVersion | undefined> {
|
||||
const { 'mixed-port': mixedPort = 7890 } = await getControledMihomoConfig()
|
||||
const res = await axios.get(
|
||||
'https://github.com/mihomo-party-org/mihomo-party/releases/latest/download/latest.yml',
|
||||
'https://github.com/xishang0128/mihomo-party/releases/latest/download/latest.yml',
|
||||
{
|
||||
headers: { 'Content-Type': 'application/octet-stream' },
|
||||
proxy: {
|
||||
@ -35,7 +35,7 @@ export async function checkUpdate(): Promise<IAppVersion | undefined> {
|
||||
|
||||
export async function downloadAndInstallUpdate(version: string): Promise<void> {
|
||||
const { 'mixed-port': mixedPort = 7890 } = await getControledMihomoConfig()
|
||||
const baseUrl = `https://github.com/mihomo-party-org/mihomo-party/releases/download/v${version}/`
|
||||
const baseUrl = `https://github.com/xishang0128/mihomo-party/releases/download/v${version}/`
|
||||
const fileMap = {
|
||||
'win32-x64': `mihomo-party-windows-${version}-x64-setup.exe`,
|
||||
'win32-ia32': `mihomo-party-windows-${version}-ia32-setup.exe`,
|
||||
|
||||
@ -135,8 +135,8 @@ const ConnectionDetailModal: React.FC<Props> = (props) => {
|
||||
<ModalBody>
|
||||
<SettingItem title="连接建立时间">{dayjs(connection.start).fromNow()}</SettingItem>
|
||||
<SettingItem title="规则">
|
||||
{connection.rule}
|
||||
{connection.rulePayload ? `(${connection.rulePayload})` : '未命中任何规则'}
|
||||
{connection.rule ? connection.rule : '未命中任何规则'}
|
||||
{connection.rulePayload ? `(${connection.rulePayload})` : ''}
|
||||
</SettingItem>
|
||||
<SettingItem title="代理链">{[...connection.chains].reverse().join('>>')}</SettingItem>
|
||||
<SettingItem title="上传速度">{calcTraffic(connection.uploadSpeed || 0)}/s</SettingItem>
|
||||
|
||||
@ -50,6 +50,7 @@ const GeneralConfig: React.FC = () => {
|
||||
customTheme = 'default.css',
|
||||
envType = [platform === 'win32' ? 'powershell' : 'bash'],
|
||||
autoCheckUpdate,
|
||||
updateChannel = 'release',
|
||||
appTheme = 'system'
|
||||
} = appConfig || {}
|
||||
|
||||
@ -101,6 +102,20 @@ const GeneralConfig: React.FC = () => {
|
||||
}}
|
||||
/>
|
||||
</SettingItem>
|
||||
{/* <SettingItem title="更新通道" divider>
|
||||
<Select
|
||||
classNames={{ trigger: 'data-[hover=true]:bg-default-200' }}
|
||||
className="w-[150px]"
|
||||
size="sm"
|
||||
selectedKeys={new Set([updateChannel])}
|
||||
onSelectionChange={async (v) => {
|
||||
patchAppConfig({ updateChannel: v.currentKey as string })
|
||||
}}
|
||||
>
|
||||
<SelectItem key="release">正式版</SelectItem>
|
||||
<SelectItem key="testing">测试版</SelectItem>
|
||||
</Select>
|
||||
</SettingItem> */}
|
||||
<SettingItem title="静默启动" divider>
|
||||
<Switch
|
||||
size="sm"
|
||||
|
||||
@ -44,7 +44,7 @@ const UpdaterModal: React.FC<Props> = (props) => {
|
||||
size="sm"
|
||||
className="flex app-nodrag"
|
||||
onPress={() => {
|
||||
open(`https://github.com/mihomo-party-org/mihomo-party/releases/tag/v${version}`)
|
||||
open(`https://github.com/xishang0128/mihomo-party/releases/tag/v${version}`)
|
||||
}}
|
||||
>
|
||||
前往下载
|
||||
|
||||
@ -36,7 +36,7 @@ const Settings: React.FC = () => {
|
||||
className="app-nodrag"
|
||||
title="GitHub 仓库"
|
||||
onPress={() => {
|
||||
window.open('https://github.com/mihomo-party-org/mihomo-party')
|
||||
window.open('https://github.com/xishang0128/mihomo-party')
|
||||
}}
|
||||
>
|
||||
<IoLogoGithub className="text-lg" />
|
||||
|
||||
1
src/shared/types.d.ts
vendored
1
src/shared/types.d.ts
vendored
@ -304,6 +304,7 @@ interface IAppConfig {
|
||||
appTheme: AppTheme
|
||||
customTheme?: string
|
||||
autoCheckUpdate: boolean
|
||||
updateChannel: string
|
||||
silentStart: boolean
|
||||
autoCloseConnection: boolean
|
||||
sysProxy: ISysProxyConfig
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user