Combine bundle stats comments in PR (#6101)

* Combine bundle stats comments in PR

* Refactor bundle stats comment generation to use a mapping approach for base and head stats, improving argument parsing and validation in the CI action.

* Enhance size comparison workflow by adding steps to checkout the base branch and set up the environment, ensuring accurate build status checks for pull requests.

* Implement size comparison job in GitHub Actions workflow, replacing the deprecated size-compare.yml. This new job downloads build stats from both the base and head branches, processes the stats files, and generates a combined comment for pull requests, enhancing visibility into bundle size changes.

* Add release notes for bundle size stats update, consolidating workflow and PR comment generation.

* Refactor GitHub Actions workflows by removing the deprecated size comparison job from build.yml and introducing a new size-compare.yml workflow. This new workflow enhances build status checks and ensures accurate reporting of bundle size changes for pull requests.

* chore: update action versions and improve error messages in bundle stats scripts

- Updated GitHub Actions to specific commit versions for `upload-artifact` and `checkout`.
- Enhanced error messages in `bundle-stats-comment.mjs` and `update-bundle-stats-comment.mjs` for better clarity and consistency, replacing standard quotes with typographic quotes.

* fix: standardize error messages in bundle-stats-comment.mjs

- Updated error messages in `bundle-stats-comment.mjs` to remove typographic quotes for consistency and clarity.
This commit is contained in:
Matiss Janis Aboltins
2025-11-13 18:11:34 +00:00
committed by GitHub
parent 033fd2d7e1
commit 7648fc6809
5 changed files with 924 additions and 28 deletions

View File

@@ -30,11 +30,18 @@ jobs:
run: cd packages/api && yarn build
- name: Create package tgz
run: cd packages/api && yarn pack && mv package.tgz actual-api.tgz
- name: Prepare bundle stats artifact
run: cp packages/api/app/stats.json api-stats.json
- name: Upload Build
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: actual-api
path: packages/api/actual-api.tgz
- name: Upload API bundle stats
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: api-build-stats
path: api-stats.json
crdt:
runs-on: ubuntu-latest