ci: アイコンビルドを単一の workflow_dispatch に整理#2186
Open
herablog wants to merge 1 commit into
Open
Conversation
|
build-icon.yml と build-icon-from-figma.yml に分かれていたアイコン ビルドを、build-icon.yml の単一 workflow_dispatch に一本化する。 - build-icon-from-figma.yml(Figma選択起点のトリガー)を削除 - figma.json 生成を node -p のインライン文字列から、独立した Node スクリプト内で JSON.parse(process.env.ICON_NAMES) として読み取る 形にリファクタリング(入力をコードへ展開せずデータとして扱う) - icon_names のバリデーション(JSON配列・文字列要素・非空)を追加 - デフォルト値 ["ALL"] を廃止し、空入力はエラーで早期に失敗させる - ["ALL"] を iconNames: 'ALL' へ正しく変換(従来は文字列化され全件 取得が機能していなかった) - 入力例を Figma のコンポーネント名(snake_case)に修正
87b27e3 to
a665741
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
アイコンビルド用のワークフローが
build-icon.yml(手動トリガー)とbuild-icon-from-figma.yml(Figma選択トリガー)の2本に分かれており、役割が重複していて分かりづらい状態でした。これをbuild-icon.ymlの単一workflow_dispatchに整理・一本化するリファクタリングです。あわせてfigma.jsonの生成処理を読みやすく書き直し、その副次効果として入力の扱いがより安全になりました。変更内容
ワークフローの一本化
build-icon-from-figma.yml(Figmaプラグイン/選択起点のトリガー)を削除build-icon.ymlの手動workflow_dispatchのみに統一figma.json生成処理のリファクタリングnode -p "...'$ICON_NAMES'..."のように入力をインラインの文字列へ展開して生成していたものを、独立した Node スクリプト内でJSON.parse(process.env.ICON_NAMES)として読み取る形に整理入力(
icon_names)の扱いを厳格化["ALL"]を廃止(意図せず全件取得が走らないように)["ALL"]の挙動を修正iconNames: 'ALL'へ正しく変換するよう修正(明示的に["ALL"]を指定したときのみ全件取得)入力例の修正
icon_namesの説明例を、実際に照合される Figma のコンポーネント名(snake_case, 例:["align_left","album_fill"])に修正影響・注意点
build iconワークフローをworkflow_dispatch(手動)で実行してください。icon_namesの指定が必須になりました(全件取得したい場合は明示的に["ALL"]を入力)。icons.figma.tsx)の再生成は従来どおりこのワークフロー内で行うため、FIGMA_TOKEN_CODE_CONNECTは引き続き必要です。動作確認
figma.json生成ロジックをローカルで検証:''/ 空白のみ[](空配列)["align_left","album_fill"]["ALL"]iconNames: "ALL"に正規化https://claude.ai/code/session_01Cx2kcSSeSd8Pju1fjCwNUT