@@ -2,26 +2,20 @@ name: Dist Files Size Diff
22
33on :
44 pull_request :
5+ types : [opened, synchronize]
56 paths :
67 - ' src/*/assets/dist/**'
78 - ' src/*/src/Bridge/*/assets/dist/**'
89
910jobs :
1011 dist-files-size-diff :
1112 runs-on : ubuntu-latest
12- permissions :
13- pull-requests : write # for marocchino/sticky-pull-request-comment@v2
1413 steps :
1514 - name : Configure git
1615 run : |
1716 git config --global user.email ""
1817 git config --global user.name "github-action[bot]"
1918
20- - uses : marocchino/sticky-pull-request-comment@v2
21- with :
22- message : |
23- ⏳ The dist files size difference is being calculated...
24-
2519 - uses : actions/checkout@v4
2620 with :
2721 ref : ${{ github.base_ref }}
@@ -60,18 +54,12 @@ jobs:
6054 result-encoding : string
6155 script : |
6256 const { main } = await import('${{ github.workspace }}/.github/generate-dist-files-size-diff.mjs')
57+ const diff = await main()
58+ console.log(diff);
59+ fs.writeFileSync(process.env.GITHUB_WORKSPACE + '/dist-size.md', diff)
6360
64- return await main()
65-
66- - name : Comment on the pull request (if any failure)
67- if : ${{ failure() }}
68- uses : marocchino/sticky-pull-request-comment@v2
69- with :
70- message : |
71- ❌ The dist files size difference could not be calculated. Please check the logs for more details.
72-
73- - name : Comment on the pull request (if success)
74- if : ${{ always() && steps.diff.conclusion == 'success' }}
75- uses : marocchino/sticky-pull-request-comment@v2
61+ - name : Upload the diff
62+ uses : actions/upload-artifact@v4
7663 with :
77- message : ${{ steps.diff.outputs.result }}
64+ name : dist-size-${{ github.event.number }}
65+ path : ./dist-size.md
0 commit comments