2022-03-11 22:56:05 +08:00
|
|
|
name: 📦 Package Size Report
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
2022-03-13 16:31:55 +08:00
|
|
|
branches:
|
|
|
|
- 'master'
|
2022-03-11 22:56:05 +08:00
|
|
|
types: [opened, synchronize]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
size-report:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
CI_JOB_NUMBER: 1
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup node
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: '16'
|
|
|
|
|
|
|
|
- name: Setup pnpm
|
|
|
|
uses: pnpm/action-setup@v2
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
|
|
|
|
- name: Cache ~/.pnpm-store
|
|
|
|
uses: actions/cache@v2
|
|
|
|
env:
|
|
|
|
cache-name: cache-pnpm-store
|
|
|
|
with:
|
|
|
|
path: ~/.pnpm-store
|
|
|
|
key: ${{ runner.os }}-publish-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-publish-${{ env.cache-name }}-
|
|
|
|
${{ runner.os }}-publish-
|
|
|
|
${{ runner.os }}-
|
|
|
|
|
|
|
|
- uses: preactjs/compressed-size-action@v2
|
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
pattern: './dist/element-plus/dist/*.{js,mjs,css}'
|