Skip to content

Commit

Permalink
feat(bezier-raect): set workflow to generate svg icon files
Browse files Browse the repository at this point in the history
  • Loading branch information
yangwooseong committed Sep 4, 2023
1 parent eae8ca8 commit 0421845
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/generate-icon-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Generate icon files from icons json

on:
push:
branches:
- icon-*
paths:
- packages/bezier-icons/icons.json

jobs:
generate-svg:
name: Generate icon svg files
runs-on: ubuntu-latest
steps:
- name: Get Yarn cache path
id: yarn-cache
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.17.1

- name: Load Yarn cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: |
yarn install
- name: Generate Svg files from icons.json
run: |
yarn workspace bezier-icons generate-svg-files
git add .
git commit -m "feat(bezier-icons): generate svg files from icons.json"
git push
3 changes: 2 additions & 1 deletion packages/bezier-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"test": "jest --onlyChanged",
"clean": "run-s 'clean:*'",
"clean:build": "rm -rf dist",
"clean:cache": "rm -rf node_modules .turbo .eslintcache stats.html"
"clean:cache": "rm -rf node_modules .turbo .eslintcache stats.html",
"generate-svg-files": "node scripts/generate-svg-files.ts"
},
"keywords": [
"channel",
Expand Down
1 change: 1 addition & 0 deletions packages/bezier-icons/scripts/generate-svg-files.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("LOG")

0 comments on commit 0421845

Please sign in to comment.