mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
e6c93ab1c0
28
.github/workflows/build.yml
vendored
28
.github/workflows/build.yml
vendored
@ -8,14 +8,9 @@ on:
|
|||||||
permissions: write-all
|
permissions: write-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-linux:
|
build-liteloader:
|
||||||
if: ${{ startsWith(github.event.head_commit.message, 'build:') }}
|
if: ${{ startsWith(github.event.head_commit.message, 'build:') }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
target_platform: [linux]
|
|
||||||
target_arch: [x64, arm64]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone Main Repository
|
- name: Clone Main Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -30,24 +25,19 @@ jobs:
|
|||||||
node-version: 20.x
|
node-version: 20.x
|
||||||
- name: Build NuCat Linux
|
- name: Build NuCat Linux
|
||||||
run: |
|
run: |
|
||||||
npm i --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
|
npm i
|
||||||
npm run build:prod
|
npm run build:prod
|
||||||
cd dist
|
cd dist
|
||||||
npm i --omit=dev --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
|
npm i --omit=dev
|
||||||
cd ..
|
cd ..
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: NapCat.${{ matrix.target_platform }}.${{ matrix.target_arch }}
|
name: NapCat.LiteLoader
|
||||||
path: dist
|
path: dist
|
||||||
build-win32:
|
build-shell:
|
||||||
if: ${{ startsWith(github.event.head_commit.message, 'build:') }}
|
if: ${{ startsWith(github.event.head_commit.message, 'build:') }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
target_platform: [win32]
|
|
||||||
target_arch: [x64,ia32]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone Main Repository
|
- name: Clone Main Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -62,13 +52,13 @@ jobs:
|
|||||||
node-version: 20.x
|
node-version: 20.x
|
||||||
- name: Build NuCat Linux
|
- name: Build NuCat Linux
|
||||||
run: |
|
run: |
|
||||||
npm i --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
|
npm i
|
||||||
npm run build:prod
|
npm run build:shell
|
||||||
cd dist
|
cd dist
|
||||||
npm i --omit=dev --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
|
npm i --omit=dev
|
||||||
cd ..
|
cd ..
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: NapCat.${{ matrix.target_platform }}.${{ matrix.target_arch }}
|
name: NapCat.Shell
|
||||||
path: dist
|
path: dist
|
||||||
|
42
.github/workflows/release.yml
vendored
42
.github/workflows/release.yml
vendored
@ -30,14 +30,9 @@ jobs:
|
|||||||
ls
|
ls
|
||||||
node ./script/checkVersion.cjs
|
node ./script/checkVersion.cjs
|
||||||
sh ./checkVersion.sh
|
sh ./checkVersion.sh
|
||||||
build-linux:
|
build-Liteloader:
|
||||||
needs: [check-version]
|
needs: [check-version]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
target_platform: [linux]
|
|
||||||
target_arch: [x64, arm64]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone Main Repository
|
- name: Clone Main Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -51,28 +46,21 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 20.x
|
node-version: 20.x
|
||||||
|
|
||||||
- name: Build NuCat Linux
|
- name: Build NuCat LiteLoader
|
||||||
run: |
|
run: |
|
||||||
export NAPCAT_BUILDSYS=${{ matrix.target_platform }}
|
npm i
|
||||||
export NAPCAT_BUILDARCH=${{ matrix.target_arch }}
|
npm run build:liteloader
|
||||||
npm i --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
|
|
||||||
npm run build:prod
|
|
||||||
cd dist
|
cd dist
|
||||||
npm i --omit=dev --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
|
npm i --omit=dev
|
||||||
cd ..
|
cd ..
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: NapCat.${{ matrix.target_platform }}.${{ matrix.target_arch }}
|
name: NapCat.Liteloader
|
||||||
path: dist
|
path: dist
|
||||||
build-win32:
|
build-Shell:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [check-version]
|
needs: [check-version]
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
target_platform: [win32]
|
|
||||||
target_arch: [x64,ia32]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone Main Repository
|
- name: Clone Main Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -89,22 +77,20 @@ jobs:
|
|||||||
|
|
||||||
- name: Build NuCat Linux
|
- name: Build NuCat Linux
|
||||||
run: |
|
run: |
|
||||||
export NAPCAT_BUILDSYS=${{ matrix.target_platform }}
|
npm i
|
||||||
export NAPCAT_BUILDARCH=${{ matrix.target_arch }}
|
|
||||||
npm i --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
|
|
||||||
npm run build:prod
|
npm run build:prod
|
||||||
cd dist
|
cd dist
|
||||||
npm i --omit=dev --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
|
npm i --omit=dev
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: NapCat.${{ matrix.target_platform }}.${{ matrix.target_arch }}
|
name: NapCat.Shell
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
release-napcat:
|
release-napcat:
|
||||||
needs: [build-win32,build-linux]
|
needs: [build-Liteloader,build-Shell]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Download All Artifact
|
- name: Download All Artifact
|
||||||
@ -130,10 +116,8 @@ jobs:
|
|||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
body_path: CHANGELOG.md
|
body_path: CHANGELOG.md
|
||||||
files: |
|
files: |
|
||||||
NapCat.win32.ia32.zip
|
NapCat.Liteloader.zip
|
||||||
NapCat.win32.x64.zip
|
NapCat.Shell.zip
|
||||||
NapCat.linux.x64.zip
|
|
||||||
NapCat.linux.arm64.zip
|
|
||||||
# NapCat.darwin.x64.zip
|
# NapCat.darwin.x64.zip
|
||||||
# NapCat.darwin.arm64.zip
|
# NapCat.darwin.arm64.zip
|
||||||
draft: true
|
draft: true
|
||||||
|
69
.github/workflows/test.yml
vendored
69
.github/workflows/test.yml
vendored
@ -1,69 +0,0 @@
|
|||||||
name: "Build Test"
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions: write-all
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-linux:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
target_platform: [linux]
|
|
||||||
target_arch: [x64, arm64]
|
|
||||||
steps:
|
|
||||||
- name: Clone Main Repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: 'NapNeko/NapCatQQ'
|
|
||||||
submodules: true
|
|
||||||
ref: main
|
|
||||||
token: ${{ secrets.NAPCAT_BUILD }}
|
|
||||||
- name: Use Node.js 20.X
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20.x
|
|
||||||
- name: Build NuCat Linux
|
|
||||||
run: |
|
|
||||||
npm i --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
|
|
||||||
npm run build:prod
|
|
||||||
cd dist
|
|
||||||
npm i --omit=dev --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
|
|
||||||
cd ..
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: NapCat.${{ matrix.target_platform }}.${{ matrix.target_arch }}
|
|
||||||
path: dist
|
|
||||||
build-win32:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
target_platform: [win32]
|
|
||||||
target_arch: [x64,ia32]
|
|
||||||
steps:
|
|
||||||
- name: Clone Main Repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: 'NapNeko/NapCatQQ'
|
|
||||||
submodules: true
|
|
||||||
ref: main
|
|
||||||
token: ${{ secrets.NAPCAT_BUILD }}
|
|
||||||
- name: Use Node.js 20.X
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20.x
|
|
||||||
- name: Build NuCat Linux
|
|
||||||
run: |
|
|
||||||
npm i --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
|
|
||||||
npm run build:prod
|
|
||||||
cd dist
|
|
||||||
npm i --omit=dev --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
|
|
||||||
cd ..
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: NapCat.${{ matrix.target_platform }}.${{ matrix.target_arch }}
|
|
||||||
path: dist
|
|
@ -8,7 +8,6 @@ import babel from 'vite-plugin-babel';
|
|||||||
//依赖排除
|
//依赖排除
|
||||||
const external = ['silk-wasm', 'ws', 'express', 'fluent-ffmpeg', 'log4js', 'qrcode-terminal'];
|
const external = ['silk-wasm', 'ws', 'express', 'fluent-ffmpeg', 'log4js', 'qrcode-terminal'];
|
||||||
const nodeModules = [...builtinModules, builtinModules.map(m => `node:${m}`)].flat();
|
const nodeModules = [...builtinModules, builtinModules.map(m => `node:${m}`)].flat();
|
||||||
|
|
||||||
function genCpModule(module: string) {
|
function genCpModule(module: string) {
|
||||||
return { src: `./node_modules/${module}`, dest: `dist/node_modules/${module}`, flatten: false };
|
return { src: `./node_modules/${module}`, dest: `dist/node_modules/${module}`, flatten: false };
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user