Skip to content

Commit

Permalink
feat: s2 foundations (#135)
Browse files Browse the repository at this point in the history
* feat: s2 foundations w/ corner radius

* fix: corner-radius-1000 type was incorrect

* fix: icon token for foundation

* fix: component-pill-edge-to-visual-only tokens for foundation

* fix: component-pill-edge-to-visual-only tokens for foundation on mobile

* chore: added s2 foundations workflow action support

* chore: testing git actions stuff

* chore: testing git actions

* chore: testing git action stuff

* chore: updating with latest git action definitions

* chore: removed renamed workflow script

---------

Co-authored-by: Frank Karstens <karstens@adobe.com>
Co-authored-by: Garth Braithwaite <garthdb@gmail.com>
  • Loading branch information
3 people authored Aug 27, 2024
1 parent c4eb7bb commit 5321e12
Show file tree
Hide file tree
Showing 20 changed files with 13,118 additions and 6,824 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/_diff-trigger-sync.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: (trigger diff sync)
name: (trigger a sync)

on:
workflow_call:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
node-version: '20.11.1'
- name: Sync the token data
run: |
node spectrum-tokens-studio-data/.github/workflows/diff.js -action -source=./spectrum-tokens-studio-data/src/tokens-studio/${{ inputs.source }} -destination=./spectrum-tokens/packages/tokens/src/
node spectrum-tokens-studio-data/.github/workflows/sync.js -action -source=./spectrum-tokens-studio-data/src/tokens-studio/${{ inputs.source }} -destination=./spectrum-tokens/packages/tokens/src/
echo -e "**[SYNCING ${{ inputs.source }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})**\n\n$(cat ./logs/cout.log)" > ./logs/cout.log
- name: Create PR Body Message
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/_diff-trigger-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: (trigger diff test)
name: (trigger a test)

on:
workflow_call:
Expand Down Expand Up @@ -36,7 +36,7 @@ jobs:
node-version: '20.11.1'
- name: Test the token data
run: |
node spectrum-tokens-studio-data/.github/workflows/diff.js -action -test -source=./spectrum-tokens-studio-data/src/tokens-studio/${{ inputs.source }} -destination=./spectrum-tokens/packages/tokens/src/
node spectrum-tokens-studio-data/.github/workflows/sync.js -action -test -source=./spectrum-tokens-studio-data/src/tokens-studio/${{ inputs.source }} -destination=./spectrum-tokens/packages/tokens/src/
echo -e "**[TESTING ${{ inputs.source }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})**\n\n$(cat ./logs/cout.log)" > ./logs/cout.log
- name: Append script summary to PR
if: ${{ github.event_name == 'pull_request' }}
Expand Down
5,592 changes: 0 additions & 5,592 deletions .github/workflows/diff.js

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/sync-foundations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: SYNC FOUNDATIONS

on:
workflow_dispatch

jobs:
check_should_run:
uses: ./.github/workflows/_diff-should-run.yml
secrets: inherit
diff_do:
needs: [check_should_run]
if: ${{ needs.check_should_run.outputs.condition == 'true' && (github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch')}}
uses: ./.github/workflows/_diff-trigger-sync.yml
with:
source: foundations # the tokens-studio data we want to compare (folder prefix in the repo)
branch: snapshot-s2-foundations # the spectrum-tokens data we want to compare (branch of the repo)
secrets: inherit
6,914 changes: 6,914 additions & 0 deletions .github/workflows/sync.js

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions .github/workflows/test-foundations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: TEST FOUNDATIONS

on:
workflow_dispatch:
pull_request:
types: [opened, reopened, synchronize]
branches:
- main # only run on PRs targetting main
paths:
- 'src/tokens-studio/foundations/**' # only run when files in these paths change

jobs:
check_should_run:
uses: ./.github/workflows/_diff-should-run.yml
secrets: inherit
diff_test:
needs: [check_should_run]
if: ${{ needs.check_should_run.outputs.condition == 'true' }}
uses: ./.github/workflows/_diff-trigger-test.yml
with:
source: foundations # the tokens-studio data we want to compare (folder prefix in the repo)
branch: snapshot-s2-foundations # the spectrum-tokens data we want to compare (branch of the repo)
secrets: inherit
Loading

0 comments on commit 5321e12

Please sign in to comment.