Skip to content

feat(workflows): add a build-tokens workflow #2

feat(workflows): add a build-tokens workflow

feat(workflows): add a build-tokens workflow #2

Workflow file for this run

name: Build Tokens
on:
pull_request:
types: [opened, synchronize, edited, reopened]
paths:
- 'packages/tokens/**'
jobs:
build:
name: Build Tokens
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup-pnpm
- name: Install tokens & dependencies
run: pnpm --filter design-system-tokens... install
- name: Build tokens & dependencies
run: pnpm --filter design-system-tokens... build
- name: Create Summary
id: summary
uses: actions/github-script@v7
with:
script: |
const fs = require('fs')
const input = JSON.parse(fs.readFileSync('packages/tokens/tokenstudio-generated/tokens.json', 'utf8'))
return `# Build Tokens
- Input:
<pre>${JSON.stringify(input, null, 2)}</pre>
`
- name: Output Summary
run: echo -e ${{ steps.summary.outputs.result }} >> $GITHUB_STEP_SUMMARY