From bfb7e5f4023bca93930b1c29a9d2f0b2f4fe72db Mon Sep 17 00:00:00 2001 From: Jean-Philippe Kha Date: Fri, 18 Oct 2024 17:21:30 +0200 Subject: [PATCH] [config] Modify icons workflows --- .github/workflows/icons.yml | 25 +++---------------- .../assets/books_movies_and_music.svg | 8 ++++++ 2 files changed, 12 insertions(+), 21 deletions(-) create mode 100644 packages/filigran-icon/assets/books_movies_and_music.svg diff --git a/.github/workflows/icons.yml b/.github/workflows/icons.yml index 135d3ed..4b69a17 100644 --- a/.github/workflows/icons.yml +++ b/.github/workflows/icons.yml @@ -15,33 +15,17 @@ jobs: with: node-version: "20" cache: ${{ steps.detect-package-manager.outputs.manager }} - - name: Restore cache - uses: actions/cache@v4 - with: - path: | - projects/filigran-website/.next/cache - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- - name: Install dependencies run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} - - name: Install svgr/cli - run: yarn global add @svgr/cli - name: Install rimraf and tsup - run: yarn global add rimraf tsup typescript - - name: Install TypeScript - run: cd packages/filigran-icon && yarn add typescript --dev + 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 extract-icons + run: cd packages/filigran-icon && build:all env: FIGMA_FILE_ID: ${{ secrets.FIGMA_FILE_ID_ICONS }} FIGMA_API_TOKEN: ${{ secrets.FIGMA_API_TOKEN }} - - - name: Run svgr - run: cd packages/filigran-icon && yarn svgr - - - name: Run build - run: cd packages/filigran-icon && yarn build - name: Commit changes run: | git config --global user.name 'github-actions[bot]' @@ -52,7 +36,6 @@ jobs: 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: diff --git a/packages/filigran-icon/assets/books_movies_and_music.svg b/packages/filigran-icon/assets/books_movies_and_music.svg new file mode 100644 index 0000000..82599b5 --- /dev/null +++ b/packages/filigran-icon/assets/books_movies_and_music.svg @@ -0,0 +1,8 @@ + + + + + + + +