39 lines
851 B
YAML
39 lines
851 B
YAML
name: Extension Build & Release
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'extension/**'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: arm
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
steps:
|
|
- name: 获取代码
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 安装 Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: 编译浏览器扩展
|
|
run: |
|
|
cd extension
|
|
npm install
|
|
npm run build
|
|
|
|
- name: 打包为 Zip 文件
|
|
run: |
|
|
cd extension/dist
|
|
zip -r ../../insight-reply-extension.zip .
|
|
|
|
- name: 上传构建产物 (Artifact)
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: insight-reply-extension
|
|
path: insight-reply-extension.zip
|