mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 05:00:30 +08:00
release
This commit is contained in:
parent
6ffe0e86f4
commit
6ea268c804
43
.github/workflows/build.yml
vendored
43
.github/workflows/build.yml
vendored
@ -49,16 +49,7 @@ jobs:
|
||||
with:
|
||||
files: |
|
||||
dist/*.exe
|
||||
dist/*.blockmap
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Merge Yaml
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: pnpm updater latest.yml
|
||||
- name: Publish Release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: dist/latest.yml
|
||||
dist/latest.yml
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
linux:
|
||||
@ -103,21 +94,6 @@ jobs:
|
||||
files: |
|
||||
dist/*.deb
|
||||
dist/*.rpm
|
||||
dist/*.blockmap
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Merge Yaml
|
||||
if: startsWith(github.ref, 'refs/tags/v') && matrix.arch == 'x64'
|
||||
run: pnpm updater latest-linux.yml
|
||||
- name: Merge Yaml
|
||||
if: startsWith(github.ref, 'refs/tags/v') && matrix.arch == 'arm64'
|
||||
run: pnpm updater latest-linux-arm64.yml
|
||||
- name: Publish Release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
dist/latest-linux.yml
|
||||
dist/latest-linux-arm64.yml
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
macos:
|
||||
@ -146,10 +122,7 @@ jobs:
|
||||
pnpm install
|
||||
pnpm prepare --${{ matrix.arch }}
|
||||
- name: Build
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: pnpm build:mac --${{ matrix.arch }}
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
@ -160,17 +133,5 @@ jobs:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
dist/*.dmg
|
||||
dist/*.zip
|
||||
dist/*.blockmap
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Merge Yaml
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: pnpm updater latest-mac.yml
|
||||
- name: Publish Release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: dist/latest-mac.yml
|
||||
files: dist/*.dmg
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mihomo-party",
|
||||
"version": "1.0.0",
|
||||
"version": "0.0.1",
|
||||
"description": "Mihomo Party",
|
||||
"main": "./out/main/index.js",
|
||||
"author": "mihomo-party",
|
||||
@ -12,7 +12,6 @@
|
||||
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
|
||||
"typecheck": "npm run typecheck:node && npm run typecheck:web",
|
||||
"prepare": "node scripts/prepare.mjs",
|
||||
"updater": "node scripts/updater.mjs",
|
||||
"dev": "electron-vite dev",
|
||||
"postinstall": "electron-builder install-app-deps",
|
||||
"build:win": "electron-vite build && electron-builder --win --publish never",
|
||||
@ -26,7 +25,6 @@
|
||||
"@nextui-org/react": "^2.4.6",
|
||||
"axios": "^1.7.2",
|
||||
"dayjs": "^1.11.12",
|
||||
"electron-updater": "^6.2.1",
|
||||
"framer-motion": "^11.3.19",
|
||||
"next-themes": "^0.3.0",
|
||||
"pubsub-js": "^1.9.4",
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
import axios from 'axios'
|
||||
import yaml from 'yaml'
|
||||
import fs from 'fs'
|
||||
|
||||
let file = 'latest.yml'
|
||||
if (process.argv.slice(2).length !== 0) {
|
||||
file = process.argv.slice(2)[0]
|
||||
}
|
||||
|
||||
async function check() {
|
||||
try {
|
||||
const res = await axios.get(
|
||||
`https://github.com/pompurin404/mihomo-party/releases/latest/download/${file}`,
|
||||
{
|
||||
headers: { 'Content-Type': 'application/octet-stream' }
|
||||
}
|
||||
)
|
||||
const remoteData = yaml.parse(res.data)
|
||||
const currentData = yaml.parse(fs.readFileSync(`dist/${file}`, 'utf8'))
|
||||
remoteData.files.push(...currentData.files)
|
||||
remoteData.releaseDate = `${new Date().toISOString()}`
|
||||
fs.writeFileSync(`dist/${file}`, yaml.stringify(remoteData))
|
||||
} catch (error) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
check().catch((error) => {
|
||||
console.error(error)
|
||||
process.exit(0)
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user