Skip to content

fix: bump vite from 6.0.11 to 6.1.0 in the svelte group #39

fix: bump vite from 6.0.11 to 6.1.0 in the svelte group

fix: bump vite from 6.0.11 to 6.1.0 in the svelte group #39

name: 'Buildsize Compare'
on:
pull_request:
jobs:
build-head:
name: 'Build head'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Upload stats
uses: actions/upload-artifact@v4
with:
name: head-stats
path: ./build-stats.json
build-base:
name: 'Build base'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Upload stats
uses: actions/upload-artifact@v4
with:
name: base-stats
path: ./build-stats.json
compare:
name: 'Compare base & head bundle sizes'
runs-on: ubuntu-latest
needs: [build-base, build-head]
permissions:
pull-requests: write
steps:
- uses: actions/download-artifact@v4
- name: Strip content hashes from stats files
run: |
sed -i -E 's/index\.[0-9a-zA-Z_-]{8,}\./index./g' ./head-stats/build-stats.json
sed -i -E 's/\.[0-9a-zA-Z_-]{8,}\.chunk\././g' ./head-stats/build-stats.json
sed -i -E 's/([0-9]{1})\.[0-9a-zA-Z_-]{8,}\./\1./g' ./head-stats/build-stats.json
sed -i -E 's/index\.[0-9a-zA-Z_-]{8,}\./index./g' ./base-stats/build-stats.json
sed -i -E 's/\.[0-9a-zA-Z_-]{8,}\.chunk\././g' ./base-stats/build-stats.json
sed -i -E 's/([0-9]{1})\.[0-9a-zA-Z_-]{8,}\./\1./g' ./base-stats/build-stats.json
- uses: vincvdwal/rollup-size-compare-action@v1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
current-stats-json-path: ./head-stats/build-stats.json
base-stats-json-path: ./base-stats/build-stats.json