Skip to content

Commit

Permalink
Add bundle-check workflow, migrate to pnpm 8 (#82)
Browse files Browse the repository at this point in the history
* Add bundle-check workflow

* migrate to pnpm 8

* file diff

* fix?

* revert file diff
  • Loading branch information
MaxLeiter authored Apr 1, 2023
1 parent d357443 commit 935aa68
Show file tree
Hide file tree
Showing 2 changed files with 187 additions and 128 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/bundle-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Bundle Size Check

on:
workflow_dispatch:
pull_request:
branches:
- main

jobs:
bundle-size:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies
run: pnpm install

- name: Build project
run: pnpm run build

- name: Calculate bundle size
id: bundle-size
run: |
SIZE=$(du -s dist | awk '{print $1}')
echo "Bundle size: $SIZE bytes"
echo "::set-output name=size::$SIZE"
- name: Store bundle size as artifact
uses: actions/upload-artifact@v3
with:
name: bundle-size
path: |
dist/
!dist/**/*.map
- name: Add bundle size comment
uses: peter-evans/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body: |
📦 **Bundle size:** The bundle size increased by ${{ steps.bundle-size.outputs.size }} bytes.
Loading

1 comment on commit 935aa68

@vercel
Copy link

@vercel vercel bot commented on 935aa68 Apr 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.