Skip to content

Commit

Permalink
Build webpack stats and upload to Relative CI
Browse files Browse the repository at this point in the history
This setup is in accordance with the workflow_run setup recommended by
RelativeCI for projects using a fork-based workflow.
https://relative-ci.com/documentation/setup/agent/github-action/#workflow_run-event
  • Loading branch information
kasperg committed Sep 19, 2022
1 parent 92f23dd commit e0aa650
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ jobs:
run: yarn install
- name: Build artifacts
run: |
yarn build:css:prod
VERSION_FILE_NAME=$GITHUB_REPOSITORY \
VERSION_FILE_VERSION=$(git describe --tags --exclude=latest) \
yarn build
- name: Upload
yarn build:js:prod --json webpack-stats.json
- name: Upload build
uses: actions/upload-artifact@v1
with:
name: dist
path: dist
- name: Upload webpack stats artifact
uses: relative-ci/agent-upload-artifact-action@v1
with:
webpackStatsFile: ./webpack-stats.json
17 changes: 17 additions & 0 deletions .github/workflows/relative_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: RelativeCI

on:
workflow_run:
workflows: ["Build"]
types:
- completed

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Send webpack stats to RelativeCI
uses: relative-ci/agent-action@v2
with:
key: ${{ secrets.RELATIVE_CI_KEY }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit e0aa650

Please sign in to comment.