Skip to content
box

GitHub Action

RelativeCI agent upload artifact

v2.0.0 Latest version

RelativeCI agent upload artifact

box

RelativeCI agent upload artifact

Upload RelativeCI artifact to share with relative-ci/agent-action

Installation

Copy and paste the following snippet into your .yml file.

              

- name: RelativeCI agent upload artifact

uses: relative-ci/agent-upload-artifact-action@v2.0.0

Learn more about this action in relative-ci/agent-upload-artifact-action

Choose a version

RelativeCI agent upload artifact action

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.

Learn more


To get started, follow RelativeCI Setup guide.

Example usage

# .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

Input

webpackStatsFile

(default: ./webpack-stats.json) Relative path to the generated bundle stats file

artifactName

(default: relative-ci-artifacts) The artifact name

artifactWebpackStatsFile

(default: webpack-stats.json) The artifact bundle stats file name

retentionDays

(default: 90) actions/upload-artifact retention-days input