Skip to content

Add svg Icons

Add svg Icons #23

Workflow file for this run

name: Add svg Icons
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Install rimraf and tsup
run: yarn global add rimraf
- name: Install packages
run: cd packages/filigran-icon && yarn install
- name: Run extract-icons
run: cd packages/filigran-icon && yarn build:all
env:
FIGMA_FILE_ID: ${{ secrets.FIGMA_FILE_ID_ICONS }}
FIGMA_API_TOKEN: ${{ secrets.FIGMA_API_TOKEN }}
- name: Commit changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git checkout -B update-icons-branch
git add .
git commit -m "Update icons and build artifacts"
git push --set-upstream origin update-icons-branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Pull Request
run: gh pr create --title "Update icons and build artifacts" --body "This PR updates the icons and build artifacts." --base main --head update-icons-branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}