-
Notifications
You must be signed in to change notification settings - Fork 28
81 lines (74 loc) · 1.81 KB
/
build.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Build
on:
push:
branches:
- master
paths:
- 'packages/*/*.ts'
- 'packages/*/package.json'
- 'pnpm-lock.yaml'
- '.github/**'
jobs:
automation:
runs-on: ubuntu-latest
if: ${{ !startsWith(github.event.head_commit.message, 'chore(release)') }}
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/[email protected]
with:
version: 8.2.0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- uses: actions/setup-java@v1
with:
java-version: '12.X'
architecture: x64
- name: Install
run: |
pnpm install
env:
CI: true
- name: Lint
run: |
pnpm lint
- name: Test
run: |
pnpm coverage
- name: Build
run: |
pnpm --parallel build:type
pnpm --parallel build:cjs
pnpm --parallel build:esm
pnpm --parallel build:browser
- name: Prepare Pull Request
id: vars
run: |
pnpm tsx .github/actions/prepare-pr/index.ts
env:
CI: true
- name: Update lock file
run: |
pnpm install --frozen-lockfile=false
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
assignees: ci010
reviewers: ci010
branch: prepare-release
title: ${{ steps.vars.outputs.title }}
body: ${{ steps.vars.outputs.body }}
commit-message: ${{ steps.vars.outputs.message }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Coverage
uses: actions/upload-artifact@master
with:
name: coverage
path: coverage