Skip to content

chore(deps): update dependency eslint-plugin-prettier to v5 #514

chore(deps): update dependency eslint-plugin-prettier to v5

chore(deps): update dependency eslint-plugin-prettier to v5 #514

Workflow file for this run

name: Analyze Bundle Size
on:
pull_request:
push:
branches:
- develop
workflow_dispatch:
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: npm ci
run: npm ci
- name: Build & analyze
run: mkdir -p .next/analyze/master && npm run analyze | tee .next/analyze/output.txt
- name: Upload bundle
uses: actions/upload-artifact@v2
with:
name: bundle
path: |
.next/analyze/client.html
.next/analyze/bundle.json
- name: Download master JSON
uses: dawidd6/action-download-artifact@v2
if: success() && github.event.number
with:
workflow: bundle-size.yml
branch: develop
path: .next/analyze/master
- name: Compare bundle size
if: success() && github.event.number
run: ls -laR .next/analyze/master && node scripts/compare-bundles.js
- name: Get comment body
id: get-comment-body
if: success() && github.event.number
run: |
body=$(cat .next/analyze/bundle-comparison.txt)
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo ::set-output name=body::$body
- name: Find Comment
uses: peter-evans/find-comment@v1
if: success() && github.event.number
id: fc
with:
issue-number: ${{ github.event.number }}
body-includes: '<!-- GH BOT -->'
- name: Create Comment
uses: peter-evans/create-or-update-comment@v1.4.5
if: success() && github.event.number && steps.fc.outputs.comment-id == 0
with:
issue-number: ${{ github.event.number }}
body: ${{ steps.get-comment-body.outputs.body }}
- name: Update Comment
uses: peter-evans/create-or-update-comment@v1.4.5
if: success() && github.event.number && steps.fc.outputs.comment-id != 0
with:
issue-number: ${{ github.event.number }}
body: ${{ steps.get-comment-body.outputs.body }}
comment-id: ${{ steps.fc.outputs.comment-id }}
edit-mode: replace