size-data.yml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. name: size data
  2. on:
  3. push:
  4. branches:
  5. - main
  6. - minor
  7. pull_request:
  8. branches:
  9. - main
  10. - minor
  11. permissions:
  12. contents: read
  13. env:
  14. PUPPETEER_SKIP_DOWNLOAD: 'true'
  15. jobs:
  16. upload:
  17. runs-on: ubuntu-latest
  18. steps:
  19. - uses: actions/checkout@v4
  20. - name: Install pnpm
  21. uses: pnpm/action-setup@v4.0.0
  22. - name: Install Node.js
  23. uses: actions/setup-node@v4
  24. with:
  25. node-version-file: '.node-version'
  26. cache: pnpm
  27. - name: Install dependencies
  28. run: pnpm install
  29. - run: pnpm run size
  30. - name: Upload Size Data
  31. uses: actions/upload-artifact@v4
  32. with:
  33. name: size-data
  34. path: temp/size
  35. - name: Save PR number
  36. if: ${{github.event_name == 'pull_request'}}
  37. run: echo ${{ github.event.number }} > ./pr.txt
  38. - uses: actions/upload-artifact@v4
  39. if: ${{github.event_name == 'pull_request'}}
  40. with:
  41. name: pr-number
  42. path: pr.txt