Skip to content

Commit

Permalink
feat(workflows): add a build-tokens workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschuerch committed Jul 12, 2024
1 parent 099ac7a commit dfccbaa
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/build-tokens.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
types: [opened, synchronize, edited, reopened]
paths:
- 'packages/tokens'
- 'packages/tokens/**'

jobs:
build:
Expand All @@ -16,18 +16,28 @@ jobs:
- name: Setup
uses: ./.github/actions/setup-pnpm

- name: Install tokens & dependencies
run: pnpm --filter design-system-tokens... install
- name: Install dependencies
run: pnpm --filter ...design-system-tokens... install

- name: Build tokens & dependencies
run: pnpm --filter design-system-tokens... build
run: pnpm --filter ...design-system-tokens... build

# TODOs:
# - Add changeset to the tokens package? (not sure if this should be done manually)
# - Build all packages which are dependant on the tokens --filter ...design-system-tokens
# (styles and components for sure, maybe more)

- name: Create Summary
id: summary
uses: actions/github-script@v7
with:
script: |
const fs = require('fs')
const input = JSON.parse(fs.readFileSync('packages/tokens/tokensstudio-generated/tokens.json', 'utf8'))
return `# Build Tokens
- Input:
<pre>${JSON.stringify(input, null, 2)}</pre>
`
- name: Output Summary
Expand Down

0 comments on commit dfccbaa

Please sign in to comment.