Skip to content

Refresh deps

Refresh deps #329

Workflow file for this run

name: Size Report
on:
pull_request:
jobs:
build-base:
name: Build base
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.base_ref }}
- name: Install dependencies
run: pnpm ci
env:
NODE_AUTH_TOKEN: ${{secrets.TOKEN_REPO}}
- name: Build
run: pnpm run build
- name: Upload base size-report.json
uses: actions/upload-artifact@v3
with:
name: base
path: ./size-report.json
retention-days: 1
build-pr:
name: Build PR
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: pnpm ci
env:
NODE_AUTH_TOKEN: ${{secrets.TOKEN_REPO}}
- name: Build
run: pnpm run build
- name: Upload base size-report.json
uses: actions/upload-artifact@v3
with:
name: pr
path: ./size-report.json
retention-days: 1
report:
name: Generate report
runs-on: ubuntu-latest
needs: [build-base, build-pr]
steps:
- name: Checkout PR
uses: actions/checkout@v3
- name: Download base size-report.json
uses: actions/download-artifact@v3
with:
name: base
path: base
- name: Download PR size-report.json
uses: actions/download-artifact@v3
with:
name: pr
path: pr
- name: Get diff
id: get-diff
uses: Konturio/bundle-size-diff@v1.0.6
with:
base_path: './base/size-report.json'
pr_path: './pr/size-report.json'
- name: Comment
uses: NejcZdovc/comment-pr@v1
with:
file: 'comment.md'
identifier: "GITHUB_COMMENT_SIZE"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
OLD: ${{steps.get-diff.outputs.base_file_string}}
NEW: ${{steps.get-diff.outputs.pr_file_string}}
DIFF: ${{steps.get-diff.outputs.diff_file_string}}
DIFF_PERCENT: ${{steps.get-diff.outputs.percent}}