-
Notifications
You must be signed in to change notification settings - Fork 197
50 lines (42 loc) · 1.21 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: npm run build 测试
on:
push:
branches:
- master
- dev
jobs:
task:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macOS-latest, ubuntu-latest]
node-version: [18.x]
npm-client: [npm, yarn, pnpm]
steps:
- uses: pnpm/action-setup@v2
if: matrix.npm-client == 'pnpm'
name: Install pnpm
with:
version: 7
run_install: false
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Check out code
uses: actions/checkout@v4
- name: Install dependencies
run: ${{ matrix.npm-client }} install
- name: Build
run: ${{ matrix.npm-client }} run build
- name: Notify failure
if: ${{ failure() }}
env:
QYWX_ROBOT_URL: ${{ secrets.QYWX_ROBOT_URL }}
run: |
curl -H "Content-Type: application/json" -X POST -d '{
"msgtype": "text",
"text": {
"content": "UI 编译任务任务执行失败,请检查!https://github.com/pig-mesh/pig-ui"
}
}' $QYWX_ROBOT_URL