File tree Expand file tree Collapse file tree 2 files changed +64
-0
lines changed Expand file tree Collapse file tree 2 files changed +64
-0
lines changed Original file line number Diff line number Diff line change 77lintstagedrc
88micnncim
99mlly
10+ nvmrc
1011syncer
1112vitepress
1213vuedx
Original file line number Diff line number Diff line change 1+ # Package Size Report
2+ #
3+ # Automate package size reports on pull request creation and synchronization.
4+ #
5+ # References:
6+ #
7+ # - https://docs.github.com/actions/learn-github-actions/contexts
8+ # - https://docs.github.com/actions/learn-github-actions/expressions
9+ # - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#pull_request
10+ # - https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request
11+ # - https://github.com/actions/checkout
12+ # - https://github.com/actions/setup-node
13+ # - https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#yarn2-configuration
14+ # - https://github.com/hmarr/debug-action
15+ # - https://github.com/pkg-size/action
16+
17+ ---
18+ name : pkg-size-report
19+ on :
20+ pull_request :
21+ branches :
22+ - main
23+ permissions :
24+ issues : write
25+ concurrency :
26+ group : ${{ github.workflow }}-${{ github.head_ref }}
27+ cancel-in-progress : true
28+ jobs :
29+ pkg-size-report :
30+ if : github.actor != 'dependabot[bot]'
31+ runs-on : ubuntu-latest
32+ steps :
33+ - id : debug
34+ name : Print environment variables and event payload
35+ uses : hmarr/debug-action@v2.1.0
36+ - id : checkout
37+ name : Checkout ${{ github.head_ref }}
38+ uses : actions/checkout@v3.3.0
39+ with :
40+ ref : ${{ github.head_ref }}
41+ - id : node
42+ name : Setup Node.js
43+ uses : actions/setup-node@v3.6.0
44+ with :
45+ cache : yarn
46+ cache-dependency-path : yarn.lock
47+ node-version-file : .nvmrc
48+ - id : build
49+ name : Build project
50+ run : yarn build
51+ env :
52+ NODE_ENV : production
53+ - id : report
54+ name : Package size report
55+ uses : pkg-size/action@v1.1.1
56+ with :
57+ build-command : false
58+ comment-report : true
59+ display-size : uncompressed
60+ mode : regression
61+ sort-by : path
62+ sort-order : desc
63+ unchanged-files : show
You can’t perform that action at this time.
0 commit comments