Skip to content

Commit

Permalink
chore: add code connect GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
jordmccord committed Jul 12, 2024
1 parent 8b0a57b commit df57ca0
Show file tree
Hide file tree
Showing 4 changed files with 355 additions and 506 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/code-connect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
on:
push:
paths:
- apps/apps/native-ui-storybook/figma-connect/*.figma.tsx
branches:
- main

jobs:
code-connect:
name: Code Connect
runs-on: ubuntu-latest
steps:
- name: 🏗 Setup repo
uses: pnpm/action-setup@v4
with:
version: 8

- name: 🏗 Checkout
uses: actions/checkout@v4

- name: 🏗 Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

- name: 📦 Install dependencies
run: pnpm install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: 🚀 Publish Figma Code Connect components
env:
FIGMA_TOKEN: ${{ secrets.FIGMA_ACCESS_TOKEN }}
run: npx figma connect publish --token ${{ secrets.FIGMA_ACESS_TOKEN }}
7 changes: 7 additions & 0 deletions figma.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"codeConnect": {
"include": ["apps/native-ui-storybook/figma-connect/**"],
"parser": "react",
"exclude": []
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"devDependencies": {
"@changesets/changelog-github": "^0.4.2",
"@changesets/cli": "^2.23.1",
"@figma/code-connect": "^1.0.2",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@utilitywarehouse/prettier-config": "^0.1.0",
Expand Down
Loading

0 comments on commit df57ca0

Please sign in to comment.