Skip to content

Commit

Permalink
Remove icons.json related step in github action (#2358)
Browse files Browse the repository at this point in the history
<!--
  How to write a good PR title:
- Follow [the Conventional Commits
specification](https://www.conventionalcommits.org/en/v1.0.0/).
  - Give as much context as necessary and as little as possible
  - Prefix it with [WIP] while it’s a work in progress
-->

## Self Checklist

- [x] I wrote a PR title in **English** and added an appropriate
**label** to the PR.
- [x] I wrote the commit message in **English** and to follow [**the
Conventional Commits
specification**](https://www.conventionalcommits.org/en/v1.0.0/).
- [x] I [added the
**changeset**](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md)
about the changes that needed to be released. (or didn't have to)
- [x] I wrote or updated **documentation** related to the changes. (or
didn't have to)
- [x] I wrote or updated **tests** related to the changes. (or didn't
have to)
- [x] I tested the changes in various browsers. (or didn't have to)
  - Windows: Chrome, Edge, (Optional) Firefox
  - macOS: Chrome, Edge, Safari, (Optional) Firefox

## Related Issue

<!-- Please link to issue if one exists -->

<!-- Fixes #0000 -->

- #2229 

## Summary

<!-- Please brief explanation of the changes made -->

- 피그마 플러그인에 의해 만들어진 icons.json에 따라 아이콘 svg파일을 만드는 스텝을 액션에서 제거합니다. 

## Details

<!-- Please elaborate description of the changes -->

- #2357 에서 피그마 플러그인이 바라보는
레포가 bezier-react에서 bezier-asset으로 변경되면 bezier-react에서는 icons.json파일이
만들어지지 않고 아이콘 파일이 직접 생성되게 됩니다. (e.g.
#2356)
- 이에 따라 기존의 generate-icon-files.yml 에서 icons.json파일 관련 스텝을 없애고 액션 이름을
변경합니다.

### Breaking change? (Yes/No)

<!-- If Yes, please describe the impact and migration path for users -->

- No

## References

<!-- Please list any other resources or points the reviewer should be
aware of -->
  • Loading branch information
yangwooseong authored Jul 17, 2024
1 parent 59ca436 commit fb80498
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 151 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/generate-icon-changeset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Generate changeset and PR description based on changed icons

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

jobs:
generate-svg:
name: Generate changeset and PR description
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

- name: Git Config
run: |
git config --global user.email "[email protected]"
git config --global user.name "ch-builder"
- name: Get PR number
id: pr
run: echo "pull_request_number=$(gh pr view --json number -q .number || echo "")" >> $GITHUB_OUTPUT

- name: Add pr description
run: |
node packages/bezier-icons/scripts/add-pr-description.js ${{ secrets.PERSONAL_ACCESS_TOKEN }} ${{ steps.pr.outputs.pull_request_number }}
- name: Add changeset
run: |
node packages/bezier-icons/scripts/generate-changeset.js
git add .
git commit -m "chore(bezier-icons): add changeset"
79 changes: 0 additions & 79 deletions .github/workflows/generate-icon-files.yml

This file was deleted.

8 changes: 0 additions & 8 deletions packages/bezier-icons/scripts/generate-icon-files.js

This file was deleted.

33 changes: 0 additions & 33 deletions packages/bezier-icons/scripts/utils/generateIconFilesFromJson.js

This file was deleted.

This file was deleted.

0 comments on commit fb80498

Please sign in to comment.