Skip to content

Commit

Permalink
Merge pull request #54 from department-of-veterans-affairs/feature/73…
Browse files Browse the repository at this point in the history
…66-roettger-automateBuildingFigmaTokens

feature Improve automate build of figma tokens
  • Loading branch information
TimRoe authored Dec 19, 2023
2 parents 383ce52 + d5a08e7 commit fdc3696
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 98 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/tokens-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
branches:
- main

env:
FIGMA_FILES_CHANGED:

jobs:
tokens-build:
runs-on: ubuntu-latest
Expand All @@ -26,15 +29,26 @@ jobs:
cache: yarn
cache-dependency-path: yarn.lock
- run: yarn install
- name: Build tokens
run: |
yarn tokens:build
- name: Commit latest figma tokens
- name: Clean `figma` folder
working-directory: packages/tokens
run: rm -rf figma
- run: yarn tokens:build
- name: Prepare commit
working-directory: packages/tokens
run: |
git config --global user.name 'VA Automation Bot'
git config --global user.email '[email protected]'
git pull
git add -f figma/
- name: Check for `figma` diff
working-directory: packages/tokens
run: echo "FIGMA_FILES_CHANGED=$(git diff HEAD --name-only figma | wc -l)" >> $GITHUB_ENV
- name: No changes to `figma` tokens
if: ${{ env.FIGMA_FILES_CHANGED == 0 }}
run: echo No changes to figma tokens
- name: Commit latest `figma` tokens
if: ${{ env.FIGMA_FILES_CHANGED >= 1 }}
working-directory: packages/tokens
run: |
git commit -m 'Build latest figma tokens'
git push
94 changes: 0 additions & 94 deletions packages/tokens/figma/color.json

This file was deleted.

0 comments on commit fdc3696

Please sign in to comment.