File tree Expand file tree Collapse file tree 2 files changed +34
-55
lines changed Expand file tree Collapse file tree 2 files changed +34
-55
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- name : size-build
1+ name : size
22on :
3- pull_request :
3+ # this action will error unless run in a pr context
4+ pull_request_target :
45 branches :
56 - main
67
78env :
89 BUNDLE_SIZE : true
910
10- permissions :
11- contents : read
11+ permissions : {}
1212
1313jobs :
1414 # Build current and upload stats.json
15+ # You may replace this with your own build method. All that
16+ # is required is that the stats.json be an artifact
1517 build-head :
1618 runs-on : ubuntu-latest
19+ permissions :
20+ contents : read
1721 steps :
1822 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
23+ with :
24+ ref : ${{ github.event.pull_request.head.sha }}
1925 - run : corepack enable
2026 - uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2127 with :
3440 path : ./packages/*/stats.json
3541
3642 # Build base for comparison and upload stats.json
43+ # You may replace this with your own build method. All that
44+ # is required is that the stats.json be an artifact
3745 build-base :
3846 runs-on : ubuntu-latest
47+ permissions :
48+ contents : read
3949 steps :
4050 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
4151 with :
5666 with :
5767 name : base-stats
5868 path : ./packages/*/stats.json
69+
70+ # run the action against the stats.json files
71+ compare :
72+ runs-on : ubuntu-latest
73+ needs : [build-base, build-head]
74+ permissions :
75+ pull-requests : write
76+ issues : write
77+ strategy :
78+ matrix :
79+ package : [nuxi, nuxt-cli, create-nuxt]
80+ steps :
81+ - name : ⏬ Download stats.json
82+ uses : actions/download-artifact@v5
83+ - uses : twk3/rollup-size-compare-action@v1.2.0
84+ with :
85+ title : ${{ matrix.package }} size comparison
86+ github-token : ${{ secrets.GITHUB_TOKEN }}
87+ current-stats-json-path : ./head-stats/${{ matrix.package }}/stats.json
88+ base-stats-json-path : ./base-stats/${{ matrix.package }}/stats.json
You can’t perform that action at this time.
0 commit comments