build design tokens via webhook #21
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: build design tokens via webhook | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
build_tokens: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: restore lerna | |
uses: actions/cache@v3 | |
with: | |
path: | | |
node_modules | |
*/*/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-v2 | |
- run: yarn install --frozen-lockfile | |
- name: Build Tokens | |
env: | |
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }} | |
FIGMA_COLOR_PRIMITIVE_FILE_ID: ${{ secrets.FIGMA_COLOR_PRIMITIVE_FILE_ID }} | |
FIGMA_COLOR_THEME_FILE_ID: ${{ secrets.FIGMA_COLOR_THEME_FILE_ID }} | |
FIGMA_COLOR_THEME_DARK_FILE_ID: ${{ secrets.FIGMA_COLOR_THEME_DARK_FILE_ID }} | |
FIGMA_DROP_SHADOW_FILE_ID: ${{ secrets.FIGMA_DROP_SHADOW_FILE_ID }} | |
run: | | |
yarn lerna run --scope @openameba/spindle-tokens export | |
# yarn lerna run --scope @openameba/spindle-tokens build | |
yarn fix | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | |
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | |
commit-message: 'feat(spindle-tokens): update design tokens' | |
branch: feat/build-tokens-via-webhook | |
delete-branch: true | |
title: 'feat(spindle-tokens): update design tokens' | |
body: '' | |
labels: | | |
spindle-tokens |