@@ -107,38 +107,43 @@ jobs:
107107 uses : codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
108108 with :
109109 files : lcov.info
110- # Check if the bundle size was committed and is up-to-date
110+ # Lint shell scripts
111+ shellcheck :
112+ runs-on : ubuntu-latest
113+ steps :
114+ - name : Checkout
115+ uses : actions/checkout@v3
116+ - name : Run shellcheck
117+ 111118 bundle-size :
112119 runs-on : ubuntu-latest
113120 steps :
114121 - name : Checking out
115- uses : actions/checkout@v2
116- with :
117- ref : ${{ github.head_ref }}
118- fetch-depth : 0
122+ uses : actions/checkout@v3
119123 - name : Install Rust toolchain
120124 uses : ./.github/actions/rust-cargo-run
121125 with :
122126 command : version
123127 github_token : ${{ secrets.GITHUB_TOKEN }}
124128 save_cache : true
125- - name : Update bundle size
129+ - name : Show bundle delta summary
130+ id : bundle-summary
126131 run : |
127- git config --local user.email "github-actions[bot]@users.noreply.github.com"
128- git config --local user.name "github-actions[bot]"
129- make bundle-size
130- git add bundle-size
131- git commit -m "[skip ci] update bundle-size" || true
132- - name : Push changes
133- uses : ad-m/github-push-action@master
132+ echo "summary=$(make bundle-size | tail -n3)" >> $$GITHUB_OUTPUT
133+ - name : Find Comment
134+ uses : peter-evans/find-comment@v2
135+ id : fc
134136 with :
135- github_token : ${{ secrets.GITHUB_TOKEN }}
136- branch : ${{ github.head_ref }}
137- # Lint shell scripts
138- shellcheck :
139- runs-on : ubuntu-latest
140- steps :
141- - name : Checkout
142- uses : actions/checkout@v3
143- - name : Run shellcheck
144- 137+ issue-number : ${{ github.event.pull_request.number }}
138+ comment-author : ' github-actions[bot]'
139+ body-includes : " ### WASM bundle size"
140+
141+ - name : Create or update comment
142+ uses : peter-evans/create-or-update-comment@v2
143+ with :
144+ comment-id : ${{ steps.fc.outputs.comment-id }}
145+ issue-number : ${{ github.event.pull_request.number }}
146+ body : |
147+ ### WASM bundle size
148+ ${{ steps.bundle-summary.outputs.summary }}
149+ edit-mode : replace
0 commit comments