size-data.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. if: github.repository == 'vuejs/vue-vapor'
  18. runs-on: ubuntu-latest
  19. steps:
  20. - uses: actions/checkout@v4
  21. - name: Install pnpm
  22. uses: pnpm/action-setup@v4.0.0
  23. - name: Install Node.js
  24. uses: actions/setup-node@v4
  25. with:
  26. node-version-file: '.node-version'
  27. cache: pnpm
  28. - name: Install dependencies
  29. run: pnpm install
  30. - run: pnpm run size
  31. - name: Download Previous Size Data
  32. uses: dawidd6/action-download-artifact@v2
  33. if: ${{ github.event_name == 'push' }}
  34. with:
  35. branch: main
  36. workflow: size-data.yml
  37. event: push
  38. name: size-data
  39. path: temp/size-prev
  40. if_no_artifact_found: warn
  41. - name: Save PR number & base branch
  42. if: ${{github.event_name == 'pull_request'}}
  43. run: |
  44. echo ${{ github.event.number }} > ./temp/size/number.txt
  45. echo ${{ github.base_ref }} > ./temp/size/base.txt
  46. - name: Upload Size Data
  47. uses: actions/upload-artifact@v4
  48. with:
  49. name: size-data
  50. path: temp/size