From dfccbaadf0975f2f4f19f470598b3a1d71fbe837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20Sch=C3=BCrch?= Date: Thu, 11 Jul 2024 16:00:21 +0200 Subject: [PATCH] feat(workflows): add a build-tokens workflow --- .github/workflows/build-tokens.yaml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-tokens.yaml b/.github/workflows/build-tokens.yaml index 9315db50b8..9418396e41 100644 --- a/.github/workflows/build-tokens.yaml +++ b/.github/workflows/build-tokens.yaml @@ -3,7 +3,7 @@ on: pull_request: types: [opened, synchronize, edited, reopened] paths: - - 'packages/tokens' + - 'packages/tokens/**' jobs: build: @@ -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: +
${JSON.stringify(input, null, 2)}
` - name: Output Summary