Skip to content

Commit

Permalink
feat: add action for creating PR on tokens sync
Browse files Browse the repository at this point in the history
  • Loading branch information
mrm1st3r committed Nov 15, 2024
1 parent e6ef1ee commit 8194f3a
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/update-tokens.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Update Design Tokens

on:
push:
# this branch must be the same as configured in figma tokensbrücke plugin for export.
branches: [tokens-sync]

env:
CI: true

jobs:
create-pr:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: "npm"
- name: Install Dependencies
run: npm ci
- name: Create changeset
# hardcode the changeset file, because the CLI doesn't allow to pass all arguments
# and relies on interactive shell usage.
run: >
echo << EOM
--- "@holisticon/hap-foundation": patch ---
Updated design tokens EOM > .changeset/update-tokens.md EOM
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
commit-message: "chore: update design tokens"
title: Update Design Tokens
body: Update design tokens from figma
branch: tokens-sync

0 comments on commit 8194f3a

Please sign in to comment.