element-plus/.github/workflows/publish-size-report.yml

46 lines
1.1 KiB
YAML
Raw Normal View History

name: 📦 Package Size Report
on:
pull_request:
2022-03-13 16:31:55 +08:00
branches:
- 'master'
types: [opened, synchronize]
jobs:
size-report:
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
2022-09-22 09:04:40 +08:00
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
2022-09-22 09:04:40 +08:00
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- uses: preactjs/compressed-size-action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pattern: './dist/element-plus/dist/*.{js,mjs,css}'
2022-06-08 16:44:18 +08:00
env:
NODE_OPTIONS: --max-old-space-size=4096