Design Tokens GitHub Actions GeneratorDraft
Generate a YAML file for your custom GitHub Actions workflow as part of your design tokens automation.
Transform Design Tokens On Update
Customize Your Workflow
The name of your workflow.
Default: Transform Design Tokens On Update
The paths to files relative to the repository root that will trigger the workflow when updated.
Default: input/design-tokens.json
Example: input/design-tokens.json, design-tokens/index.json
The name of the job.
Default: generate_tokens
The commit message for the commit containing the platform deliverables generated by Style Dictionary.
Default: Update design tokens
Your Generated Workflow
Create a workflow named Transform Design Tokens On Update
Trigger a workflow when any of the following files are updated: input/design-tokens.json
Creates a job named generate_tokens
Commits the generated platform deliverables with the following message: Update design tokens
Grab Your YAML
name: Transform Design Tokens On Update
on:
push:
paths:
- input/design-tokens.json
jobs:
generate_tokens:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "12"
- name: Install Node Dependencies
run: npm install
- name: Build Style Dictionary
run: npm run build
- name: Commit Generated Platform Deliverables
id: auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update design tokens