Import Figma variables #18
Workflow file for this run
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: Import Figma variables | |
on: | |
workflow_dispatch: | |
jobs: | |
import: | |
name: Import Figma variables | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .node-version | |
cache: pnpm | |
- name: 📦 Install dependencies | |
run: pnpm install | |
- name: 🛠️ Build Figma utils | |
run: pnpm run build | |
working-directory: packages/figma-utils | |
# we need to separately import the themes because they are all needed in different formats and selectors | |
- uses: ./.github/workflows/template-import-figma-variables.yml | |
name: Import onyx variables | |
with: | |
modes: onyx | |
selector: ":where(:root), .onyx-theme-default" | |
format: CSS JSON | |
output-directory: "../sit-onyx/src/styles/themes" | |
- name: Import additional onyx themes | |
uses: ./.github/templates/import-figma-variables | |
with: | |
modes: lidl kaufland twogo | |
selector: ":where(:root), .onyx-theme-{mode}" | |
output-directory: "../sit-onyx/src/styles/themes" | |
- name: Import light variables | |
uses: ./.github/workflows/template-import-figma-variables.yml | |
with: | |
modes: light | |
selector: ":where(:root)" | |
output-directory: "../sit-onyx/src/styles" | |
- name: Import light variables | |
uses: ./.github/workflows/template-import-figma-variables.yml | |
with: | |
modes: dark | |
selector: ":where(.dark)" | |
output-directory: "../sit-onyx/src/styles" | |
- name: Import density variables | |
uses: ./.github/workflows/template-import-figma-variables.yml | |
with: | |
modes: compact default cozy | |
selector: ":where(.onyx-density-{mode})" | |
output-directory: "../sit-onyx/src/styles" | |
file-prefix: density- | |
- name: Create pull request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
commit-message: "feat: update Figma variables" | |
title: "feat: update Figma variables" | |
body: This is an auto-generated pull request. All Figma variables have been updated. | |
branch-suffix: short-commit-hash # needed to not override other pull requests created via workflows | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH_NAME: ${{ github.ref_name }} |