Fix theming order #131
Workflow file for this run
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 Tokens | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.ACCESS_TOKEN }} | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "16" | |
# Install dependencies | |
- name: Install NPM Packages | |
run: yarn install | |
# Transform Figma Tokens JSON to something Style Dictionary can read | |
- name: Transform Figma Tokens to Style Dictionary | |
run: npx token-transformer tokens.json tokens/global.json global | |
# Create a light theme, exclude the global tokens | |
- name: Create light theme | |
run: npx token-transformer tokens.json tokens/light.json global,light,theme global | |
# Create a dark theme, exclude the global tokens | |
- name: Create dark theme | |
run: npx token-transformer tokens.json tokens/dark.json global,dark,theme global | |
# Convert tokens according to Style Dictionary config | |
- name: Convert tokens | |
run: node tokens/build.mjs | |
# Add files that were created during a run, e.g. created files from style dictionary or token-transformer. | |
- name: Commit changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Update Tokens |