mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-12-18 20:30:08 +08:00
Switch build scripts and workflows from npm to pnpm, update build and artifact paths, and simplify release workflow by removing version detection and changelog steps. Add new dependencies (silk-wasm, express, ws, node-pty-prebuilt-multiarch), update exports in package.json files, and add vite config for napcat-framework. Also, rename manifest.json for framework package and fix static asset copying in shell build config.
82 lines
2.2 KiB
YAML
82 lines
2.2 KiB
YAML
name: "Build Release"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
permissions: write-all
|
|
|
|
jobs:
|
|
Build-LiteLoader:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Clone Main Repository
|
|
uses: actions/checkout@v4
|
|
- name: Use Node.js 20.X
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20.x
|
|
- name: Build NapCat.Framework
|
|
run: |
|
|
pnpm i
|
|
pnpm --filter napcat-webui-frontend run build || exit 1
|
|
pnpm run build:framework
|
|
cd packages/napcat-framework/dist
|
|
pnpm install --production
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: NapCat.Framework
|
|
path: packages/napcat-framework/dist
|
|
|
|
Build-Shell:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Clone Main Repository
|
|
uses: actions/checkout@v4
|
|
- name: Use Node.js 20.X
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20.x
|
|
- name: Build NapCat.Shell
|
|
run: |
|
|
pnpm i
|
|
pnpm --filter napcat-webui-frontend run build || exit 1
|
|
pnpm run build:shell
|
|
cd packages/napcat-shell/dist
|
|
pnpm install --production
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: NapCat.Shell
|
|
path: packages/napcat-shell/dist
|
|
|
|
release-napcat:
|
|
needs: [Build-LiteLoader, Build-Shell]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Download All Artifact
|
|
uses: actions/download-artifact@v4
|
|
|
|
- name: Compress subdirectories
|
|
run: |
|
|
cd ./NapCat.Shell/
|
|
zip -q -r NapCat.Shell.zip *
|
|
cd ..
|
|
cd ./NapCat.Framework/
|
|
zip -q -r NapCat.Framework.zip *
|
|
cd ..
|
|
rm ./NapCat.Shell.zip -rf
|
|
rm ./NapCat.Framework.zip -rf
|
|
mv ./NapCat.Shell/NapCat.Shell.zip ./
|
|
mv ./NapCat.Framework/NapCat.Framework.zip ./
|
|
|
|
- name: Create Release Draft and Upload Artifacts
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
name: NapCat
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
body: Automated release artifact (no version detection)
|
|
files: |
|
|
NapCat.Framework.zip
|
|
NapCat.Shell.zip
|
|
draft: true |