chore: workflow

This commit is contained in:
pk5ls20 2024-11-17 06:23:33 +08:00
parent f7268c30ca
commit f913e0b027
No known key found for this signature in database
GPG Key ID: 6370ED7A169F493A

View File

@ -1,8 +1,7 @@
name: "Build Action" name: "Build Action"
on: on:
push: push:
branches: pull_request:
- main
workflow_dispatch: workflow_dispatch:
permissions: write-all permissions: write-all
@ -13,26 +12,15 @@ jobs:
steps: steps:
- name: Clone Main Repository - name: Clone Main Repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
repository: 'NapNeko/NapCatQQ'
submodules: true
ref: main
token: ${{ secrets.NAPCAT_BUILD }}
- name: Use Node.js 20.X - name: Use Node.js 20.X
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 20.x node-version: 20.x
- name: Build NuCat Framework - name: Build NapCat.Framework
run: | run: |
npm i npm i
cd napcat.webui npm run build:framework && npm run depend
npm i
cd ..
npm run build:framework
cd dist
npm i --omit=dev
rm package-lock.json rm package-lock.json
cd ..
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
@ -43,26 +31,15 @@ jobs:
steps: steps:
- name: Clone Main Repository - name: Clone Main Repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
repository: 'NapNeko/NapCatQQ'
submodules: true
ref: main
token: ${{ secrets.NAPCAT_BUILD }}
- name: Use Node.js 20.X - name: Use Node.js 20.X
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 20.x node-version: 20.x
- name: Build NuCat LiteLoader - name: Build NapCat.Shell
run: | run: |
npm i npm i
cd napcat.webui npm run build:shell && npm run depend
npm i
cd ..
npm run build:shell
cd dist
npm i --omit=dev
rm package-lock.json rm package-lock.json
cd ..
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with: