Skip to content

Export new icons from Figma #47

Export new icons from Figma

Export new icons from Figma #47

Workflow file for this run

name: Export new icons from Figma
on:
workflow_dispatch:
inputs:
fileKey:
description: Figma file key
type: string
page:
description: Stringified selected page (id, name)
type: string
default: '{}'
selection:
description: Stringified array of the selected nodes (id, name)
type: string
default: '[]'
env:
PR_BRANCH: 'update-icons'
PR_TITLE: '[Figma] Exported new changes'
PR_BODY: 'This automated pull request is prompted by recent updates in our Figma files.
Please consider merging this PR if everything meets your approval, allowing us to integrate the latest icons and changes.
[Generated on $(date)]'
jobs:
Export-icons:
name: Export Icons
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
token: ${{ secrets.CI_GITHUB_TOKEN }}
- name: Set up Git identity
run: |
git config --global user.email "[email protected]"
git config --global user.name "Quill Squad"
- name: Create a new branch
run: |
git checkout -b "$PR_BRANCH"
git pull origin main
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm clean-install
- name: Build
env:
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }}
run: npm run rebuild
- name: Commit changes
if: success()
run: |
git add .
git commit -m "chore: exported new changes"
git push --set-upstream -f origin "$PR_BRANCH"
- name: Create Pull Request
if: success()
env:
GH_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
run: |
cd $(git rev-parse --show-toplevel)
gh pr close "$PR_BRANCH" || true
gh pr create --base main --head "$PR_BRANCH" --title "$PR_TITLE" --body "$PR_BODY"