GitHub action that uploads bundle stats as an artifact to share with RelativeCI agent action when running during workflow_run
.
The artifact will be available on the workflow page (see: actions/upload-artifact "Where does the upload go?") and will count toward your GitHub storage usage.
Warning
The action uses upload-artifact@v4+, which is not currently supported on GHES yet. If you are on GHES, you must use v1.
To get started, follow RelativeCI Setup guide.
# .github/workflow/node.js.yml
name: Node.js CI
on:
push:
branches:
- master
pull_request:
jobs:
build:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'latest'
# Install dependencies
- run: npm ci
# Build bundle and output webpack stats
# Learn more how to output bundle stats https://relative-ci.com/documentation/guides/bundle-stats
- run: npm run build -- --json webpack-stats.json
# Upload relative-ci-artifact/webpack-stats.json to share with relative-ci/agent-action
- name: Upload webpack stats artifact
uses: relative-ci/agent-upload-artifact-action@v2
with:
webpackStatsFile: './webpack-stats.json
(default: ./webpack-stats.json
) Relative path to the generated bundle stats file
(default: relative-ci-artifacts
) The artifact name
(default: webpack-stats.json
) The artifact bundle stats file name
(default: 90
) actions/upload-artifact retention-days
input