style: format #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create design tokens | |
on: | |
push: | |
paths: | |
- tokens.json | |
branches-ignore: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
# Transform Figma Tokens JSON to something Style Dictionary can read | |
- run: npx token-transformer --preserveRawValue=true --expandTypography=true --expandShadow=true --expandComposition=true --expandBorder=true tokens.json style-dirctionay-tokens/input.json | |
# Convert tokens according to Style Dictionary config | |
- run: npx style-dictionary build --config style-dictionary-config.json | |
# Add files that were created during a run, e.g. created files from style dictionary or token-transformer. | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Update Tokens |