-
Notifications
You must be signed in to change notification settings - Fork 190
72 lines (53 loc) · 1.59 KB
/
size.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
name: Size
on:
push:
branches:
- main
pull_request: {}
env:
TURBO_API: http://127.0.0.1:9080
TURBO_TOKEN: this-is-not-a-secret
TURBO_TEAM: myself
jobs:
install_dependencies:
name: 'Setup'
runs-on: 'ubuntu-latest'
steps:
- uses: wyvox/action@v1
with:
pnpm-args: '--ignore-scripts'
node-version: 20.1.0
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm turbo build
- run: sudo snap install dust
- name: "Get sizes for development outputs"
id: prod
run: |
cd packages/\@glimmer
sizes=$(du --ignore_hidden \
--reverse --apparent-size \
--filter ".+\/dist\/dev\/index.js$" \
--no-percent-bars --only-dir --depth 1)
echo "sizes=$issue" >> $GITHUB_OUTPUT
- name: "Get sizes for production outputs"
id: dev
run: |
cd packages/\@glimmer
sizes=$(du --ignore_hidden \
--reverse --apparent-size \
--filter ".+\/dist\/prod\/index.js$" \
--no-percent-bars --only-dir --depth 1)
echo "sizes=$sizes" >> $GITHUB_OUTPUT
- uses: mshick/add-pr-comment@v2
with:
message: |
<table><thead><tr><th></th><th>Dev</th><th>Prod</th></tr></thead>
<tbody>
<tr><td>This PR</td><td>
${{ steps.dev.outputs.sizes }}
</td><td>
${{ steps.prod.outputs.sizes }}
</td></tr>
</tbody></table>
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}