-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
82 lines (81 loc) · 2.57 KB
/
Copy pathbuild.yml
File metadata and controls
82 lines (81 loc) · 2.57 KB
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
80
81
82
name: '🩺'
on:
pull_request:
branches: [master]
paths-ignore: [CHANGELOG.md]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Uglified build
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: ./.github/actions/cached-install
with:
node-version: 24.x
- run: pnpm run build
stats:
name: Build stats
runs-on: ubuntu-24.04
env:
minified: dist/index.min.js
bundled: dist/index.mjs
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: ./.github/actions/cached-install
with:
node-version: 24.x
- name: Build fabric.js
run: pnpm run build
- name: Create prnumber artifact
run: echo "${{ github.event.pull_request.number }}" >> ./prnumber.txt
- name: Upload Pr Number
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: prnumber
path: ./prnumber.txt
- name: Prepare pr stats
id: stats
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v6.4.1
with:
result-encoding: string
script: |
const fs = require('fs');
return JSON.stringify({
size: { fabric: { minified: fs.statSync(process.env.minified).size, bundled: fs.statSync(process.env.bundled).size } }
});
- name: Create the artifact for stats
run: echo '${{ steps.stats.outputs.result }}' > ./prstats.txt
- name: Upload Pr stats
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: prstats
path: ./prstats.txt
typecheck:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: ./.github/actions/cached-install
with:
node-version: 24.x
- name: Type check
run: pnpm run typecheck
lint:
runs-on: ubuntu-24.04
steps:
- name: Linting
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: ./.github/actions/cached-install
with:
node-version: 24.x
- run: pnpm run lint
prettier:
runs-on: ubuntu-24.04
steps:
- name: Prettier check
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: ./.github/actions/cached-install
with:
node-version: 24.x
- run: pnpm run prettier:check