-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add action for creating PR on tokens sync
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
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
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 |