-
Notifications
You must be signed in to change notification settings - Fork 669
37 lines (29 loc) · 1.04 KB
/
build-figma-tokens.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Build and commit Figma tokens
on:
push:
branches:
- figma-tokens
paths:
- packages/design-system/src/__generated__/figma-design-tokens.json
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# We don't need a token to push from an action,
# but we need it if want the commit to trigger other workflows as normal
token: ${{ secrets.ACCESS_TOKEN_FOR_FIGMA_TOKENS }}
- uses: ./.github/actions/ci-setup
- name: Configure git
run: |
git config --global user.name 'Bot (build-figma-tokens.yml)'
git config --global user.email 'bot@localhost'
- name: Switch branch
run: git checkout figma-tokens
- name: Build tokens
run: pnpm build-figma-tokens
- name: Commit and push
run: |
[[ -z `git status | grep figma-design-tokens.ts` ]] || git commit -m "Update figma-design-tokens.ts" packages/design-system/src/__generated__/figma-design-tokens.ts
git push