size-data.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 & base branch
  36. if: ${{github.event_name == 'pull_request'}}
  37. run: |
  38. echo ${{ github.event.number }} > ./number.txt
  39. echo ${{ github.base_ref }} > ./base.txt
  40. - uses: actions/upload-artifact@v4
  41. if: ${{github.event_name == 'pull_request'}}
  42. with:
  43. name: pr-info
  44. path: |
  45. number.txt
  46. base.txt