size-data.yml 997 B

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