mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2026-02-11 04:00:32 +08:00
remove support for old equipment
This commit is contained in:
parent
1537df5dcd
commit
00d8ad9a9c
44
.github/workflows/build.yml
vendored
44
.github/workflows/build.yml
vendored
@ -94,24 +94,30 @@ jobs:
|
|||||||
needs: [build]
|
needs: [build]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Download Artifacts
|
- name: Download Artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: bin/
|
path: bin/
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
|
|
||||||
- name: Delete Current
|
- name: Delete Pre-release
|
||||||
uses: 8Mi-Tech/delete-release-assets-action@main
|
env:
|
||||||
with:
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
run: |
|
||||||
tag: pre-release
|
if ! gh release delete pre-release --yes; then
|
||||||
deleteOnlyFromDrafts: false
|
echo "Failed to delete release, but continuing..."
|
||||||
|
fi
|
||||||
|
git log -1 --pretty=format:"%s%n%b" > changelog.md
|
||||||
|
|
||||||
- name: Publish Prerelease
|
- name: Publish Prerelease
|
||||||
if: success()
|
if: success()
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: pre-release
|
tag_name: pre-release
|
||||||
|
body_path: changelog.md
|
||||||
files: |
|
files: |
|
||||||
bin/latest.yml
|
bin/latest.yml
|
||||||
bin/dist/*
|
bin/dist/*
|
||||||
@ -126,20 +132,20 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Update Version
|
- name: Update Version
|
||||||
run:
|
run: |
|
||||||
INPUT_VERSION="${{ github.event.inputs.version }}"
|
INPUT_VERSION="${{ github.event.inputs.version }}"
|
||||||
CLEAN_VERSION=$(echo "$INPUT_VERSION" | sed 's/^v//')
|
CLEAN_VERSION=$(echo "$INPUT_VERSION" | sed 's/^v//')
|
||||||
if [[ ! "$CLEAN_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
if [[ ! "$CLEAN_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
echo "Invalid version format: $INPUT_VERSION"
|
echo "Invalid version format: $INPUT_VERSION"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
jq --arg version "$CLEAN_VERSION" '.version = $version' package.json > tmp.json && mv tmp.json package.json
|
jq --arg version "$CLEAN_VERSION" '.version = $version' package.json > tmp.json && mv tmp.json package.json
|
||||||
|
|
||||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
git config --global user.name "github-actions[bot]"
|
git config --global user.name "github-actions[bot]"
|
||||||
git add package.json
|
git add package.json
|
||||||
git commit -m "Update version to $CLEAN_VERSION"
|
git commit -m "Update version to $CLEAN_VERSION"
|
||||||
git push
|
git push
|
||||||
|
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
@ -21,12 +21,12 @@ const MIHOMO_ALPHA_URL_PREFIX = `https://github.com/MetaCubeX/mihomo/releases/do
|
|||||||
let MIHOMO_ALPHA_VERSION
|
let MIHOMO_ALPHA_VERSION
|
||||||
|
|
||||||
const MIHOMO_ALPHA_MAP = {
|
const MIHOMO_ALPHA_MAP = {
|
||||||
'win32-x64': 'mihomo-windows-amd64-compatible',
|
'win32-x64': 'mihomo-windows-amd64',
|
||||||
'win32-ia32': 'mihomo-windows-386',
|
'win32-ia32': 'mihomo-windows-386',
|
||||||
'win32-arm64': 'mihomo-windows-arm64',
|
'win32-arm64': 'mihomo-windows-arm64',
|
||||||
'darwin-x64': 'mihomo-darwin-amd64-compatible',
|
'darwin-x64': 'mihomo-darwin-amd64',
|
||||||
'darwin-arm64': 'mihomo-darwin-arm64',
|
'darwin-arm64': 'mihomo-darwin-arm64',
|
||||||
'linux-x64': 'mihomo-linux-amd64-compatible',
|
'linux-x64': 'mihomo-linux-amd64',
|
||||||
'linux-arm64': 'mihomo-linux-arm64'
|
'linux-arm64': 'mihomo-linux-arm64'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,12 +52,12 @@ const MIHOMO_URL_PREFIX = `https://github.com/MetaCubeX/mihomo/releases/download
|
|||||||
let MIHOMO_VERSION
|
let MIHOMO_VERSION
|
||||||
|
|
||||||
const MIHOMO_MAP = {
|
const MIHOMO_MAP = {
|
||||||
'win32-x64': 'mihomo-windows-amd64-compatible',
|
'win32-x64': 'mihomo-windows-amd64',
|
||||||
'win32-ia32': 'mihomo-windows-386',
|
'win32-ia32': 'mihomo-windows-386',
|
||||||
'win32-arm64': 'mihomo-windows-arm64',
|
'win32-arm64': 'mihomo-windows-arm64',
|
||||||
'darwin-x64': 'mihomo-darwin-amd64-compatible',
|
'darwin-x64': 'mihomo-darwin-amd64',
|
||||||
'darwin-arm64': 'mihomo-darwin-arm64',
|
'darwin-arm64': 'mihomo-darwin-arm64',
|
||||||
'linux-x64': 'mihomo-linux-amd64-compatible',
|
'linux-x64': 'mihomo-linux-amd64',
|
||||||
'linux-arm64': 'mihomo-linux-arm64'
|
'linux-arm64': 'mihomo-linux-arm64'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -133,7 +133,7 @@ export async function createProfile(item: Partial<IProfileItem>): Promise<IProfi
|
|||||||
}
|
}
|
||||||
res = await axios.get(urlObj.toString(), {
|
res = await axios.get(urlObj.toString(), {
|
||||||
headers: {
|
headers: {
|
||||||
'User-Agent': userAgent || 'clash.meta'
|
'User-Agent': userAgent || 'clash.meta/alpha-de19f92'
|
||||||
},
|
},
|
||||||
responseType: 'text'
|
responseType: 'text'
|
||||||
})
|
})
|
||||||
@ -147,7 +147,7 @@ export async function createProfile(item: Partial<IProfileItem>): Promise<IProfi
|
|||||||
}
|
}
|
||||||
: false,
|
: false,
|
||||||
headers: {
|
headers: {
|
||||||
'User-Agent': userAgent || 'clash.meta'
|
'User-Agent': userAgent || 'clash.meta/alpha-de19f92'
|
||||||
},
|
},
|
||||||
responseType: 'text'
|
responseType: 'text'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -42,7 +42,7 @@ const MihomoConfig: React.FC = () => {
|
|||||||
size="sm"
|
size="sm"
|
||||||
className="w-[60%]"
|
className="w-[60%]"
|
||||||
value={ua}
|
value={ua}
|
||||||
placeholder="默认 clash.meta"
|
placeholder="默认 clash.meta/alpha-de19f92"
|
||||||
onValueChange={(v) => {
|
onValueChange={(v) => {
|
||||||
setUa(v)
|
setUa(v)
|
||||||
setUaDebounce(v)
|
setUaDebounce(v)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user