NapCatQQ/.github/workflows/build.yml

64 lines
1.6 KiB
YAML
Raw Normal View History

2024-06-26 09:16:54 +00:00
name: "Build Action"
2024-04-15 02:48:08 +00:00
on:
2024-04-28 10:44:32 +00:00
workflow_dispatch:
2024-04-15 02:48:08 +00:00
push:
2024-04-16 06:10:31 +00:00
branches:
- main
2024-04-15 02:48:08 +00:00
2024-04-17 10:27:08 +00:00
permissions: write-all
2024-04-15 02:48:08 +00:00
jobs:
2024-08-11 17:13:03 +00:00
Build-LiteLoader:
2024-04-15 02:54:36 +00:00
if: ${{ startsWith(github.event.head_commit.message, 'build:') }}
2024-04-15 02:48:08 +00:00
runs-on: ubuntu-latest
steps:
- name: Clone Main Repository
uses: actions/checkout@v4
with:
2024-04-15 03:26:11 +00:00
repository: 'NapNeko/NapCatQQ'
2024-04-15 02:48:08 +00:00
submodules: true
2024-04-28 12:53:34 +00:00
ref: main
2024-04-27 15:50:34 +00:00
token: ${{ secrets.NAPCAT_BUILD }}
2024-04-15 02:48:08 +00:00
- name: Use Node.js 20.X
uses: actions/setup-node@v4
with:
node-version: 20.x
2024-08-11 17:13:03 +00:00
- name: Build NuCat LiteLoader
2024-04-15 02:48:08 +00:00
run: |
2024-08-11 17:09:30 +00:00
npm i
2024-08-11 17:14:38 +00:00
npm run build:liteloader
2024-04-15 02:48:08 +00:00
cd dist
2024-08-11 17:09:30 +00:00
npm i --omit=dev
2024-04-15 02:48:08 +00:00
cd ..
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
2024-08-11 17:09:30 +00:00
name: NapCat.LiteLoader
2024-04-15 02:48:08 +00:00
path: dist
2024-08-11 17:13:03 +00:00
Build-Shell:
2024-04-15 02:54:36 +00:00
if: ${{ startsWith(github.event.head_commit.message, 'build:') }}
2024-04-15 02:48:08 +00:00
runs-on: ubuntu-latest
steps:
- name: Clone Main Repository
uses: actions/checkout@v4
with:
2024-04-15 03:26:11 +00:00
repository: 'NapNeko/NapCatQQ'
2024-04-15 02:48:08 +00:00
submodules: true
2024-04-28 12:53:34 +00:00
ref: main
2024-04-27 15:50:34 +00:00
token: ${{ secrets.NAPCAT_BUILD }}
2024-04-15 02:48:08 +00:00
- name: Use Node.js 20.X
uses: actions/setup-node@v4
with:
node-version: 20.x
2024-08-11 17:14:38 +00:00
- name: Build NuCat LiteLoader
2024-04-15 02:48:08 +00:00
run: |
2024-08-11 17:09:30 +00:00
npm i
npm run build:shell
2024-04-15 02:48:08 +00:00
cd dist
2024-08-11 17:09:30 +00:00
npm i --omit=dev
2024-04-15 02:48:08 +00:00
cd ..
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
2024-08-11 17:09:30 +00:00
name: NapCat.Shell
2024-08-11 17:15:52 +00:00
path: dist