Skip to content

Commit

Permalink
chore(): Bazinga
Browse files Browse the repository at this point in the history
  • Loading branch information
n33pm committed Nov 15, 2023
0 parents commit af8e33f
Show file tree
Hide file tree
Showing 9 changed files with 43,303 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/size-compare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: SizeCompare CI

on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize, ready_for_review]

workflow_dispatch:


jobs:
check-size:
runs-on: ubuntu-20.04
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v3

- name: 📦 Setup pnpm
uses: pnpm/action-setup@v2
with:
version: latest
run_install: false

- name: 🐧 Use Node.js v18.x
uses: actions/setup-node@v3
with:
node-version: v18.x
cache: 'pnpm'

- name: 🔍 Install dependencies
run: pnpm install

- name: 🔧 Build package
run: pnpm build

- name: 🚛 Size compare
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
files: |
dist/**
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Download workflow artifact GitHub Action

Compare size changes of your bundle on Pull Requests.

## Usage

```yaml
name: SizeCompare CI

on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
workflow_dispatch:

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

# Add here your setup, installation, and build steps

- name: 🚛 Size compare
uses: numero33/size-branch-compare
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
files: |
dist/**.js
!dist/**.js.map
```
15 changes: 15 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Size Branch Compare"
description: "Compare branch size of the built assets"
branding:
icon: bar-chart-2
color: gray-dark

inputs:
github-token:
description: GitHub token to use for API calls
required: true
files:
description: A glob pattern where to find bundle files compare size for
runs:
using: "node16"
main: "dist/index.js"
Loading

0 comments on commit af8e33f

Please sign in to comment.