Skip to content

Commit

Permalink
Merge pull request #30 from Fullscript/style-dictionary-build-workflow-3
Browse files Browse the repository at this point in the history
Style dictionary build workflow 3
  • Loading branch information
alexandra-lim authored Jun 30, 2022
2 parents e929ae2 + 69fea87 commit 0668c0d
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 41 deletions.
35 changes: 25 additions & 10 deletions .github/workflows/build-tokens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,15 @@ name: Style dictionary build
on:
push:
paths:
- 'data/tokens.json'
- 'config.json'
- 'build.js'
branches-ignore:
- 'main'
workflow_run:
workflows:
- "Transform tokens using token-transformer"
types:
- "completed"
branches-ignore:
- 'main'

jobs:
generate_tokens:
transform_tokens:
name: "Token transformer"
runs-on: ubuntu-latest

steps:
Expand All @@ -26,12 +21,32 @@ jobs:
node-version: "14"
- name: Install Node Dependencies
run: npm install
- name: Run token-transformer
- name: Pull any branch changes
run: git pull origin ${{ github.head_ref }}
- name: Run token transformer
run: npm run transform
- name: Commit transformed tokens
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Transformed tokens

build_style_dictionary:
needs: transform_tokens
name: "Style Dictionary build"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: "14"
- name: Install Node Dependencies
run: npm install
- name: Pull transformed tokens changes
run: git pull origin ${{ github.head_ref }}
- name: Run style dictionary build
run: npm run build
- name: Commit built tokens
id: auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Built and updated design tokens
27 changes: 0 additions & 27 deletions .github/workflows/transform-tokens.yml

This file was deleted.

2 changes: 1 addition & 1 deletion build/scss/colors.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Tue, 28 Jun 2022 17:30:41 GMT
// Generated on Wed, 29 Jun 2022 16:10:55 GMT

$colors-green-100: #FAFFFC;
$colors-green-200: #EBF2EF;
Expand Down
2 changes: 1 addition & 1 deletion build/scss/typography.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Tue, 28 Jun 2022 17:30:41 GMT
// Generated on Wed, 29 Jun 2022 16:10:55 GMT

$typography-letter-spacing-base: 0;
$typography-paragraph-spacing-base: 0;
Expand Down
2 changes: 1 addition & 1 deletion build/ts/colors.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Do not edit directly
* Generated on Tue, 28 Jun 2022 17:30:41 GMT
* Generated on Wed, 29 Jun 2022 16:10:55 GMT
*/

export const ColorsGreen100 = "#FAFFFC";
Expand Down
2 changes: 1 addition & 1 deletion build/ts/typography.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Do not edit directly
* Generated on Tue, 28 Jun 2022 17:30:41 GMT
* Generated on Wed, 29 Jun 2022 16:10:55 GMT
*/

export const TypographyLetterSpacingBase = 0;
Expand Down

0 comments on commit 0668c0d

Please sign in to comment.