Skip to content

Commit b31a52f

Browse files
committed
chore: Add pkg-size workflow
1 parent 7997584 commit b31a52f

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/pkg-size-report.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Package size report
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
env:
8+
NODE_VERSION: 16
9+
10+
jobs:
11+
pkg-size-report:
12+
name: Package size report
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: ${{ env.NODE_VERSION }}
23+
24+
- name: Cache node_modules
25+
uses: actions/cache@v3
26+
id: cache-nodemodules
27+
with:
28+
path: node_modules
29+
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
30+
31+
- name: Install dependencies
32+
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
33+
run: yarn install --frozen-lockfile --non-interactive
34+
35+
- name: Package size report
36+
uses: pkg-size/action@v1
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)