diff --git a/.github/workflows/sync-design-tokens.yml b/.github/workflows/sync-design-tokens.yml deleted file mode 100644 index 4ea495e..0000000 --- a/.github/workflows/sync-design-tokens.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: Sync Design Tokens - -on: - workflow_dispatch: - repository_dispatch: - types: [design-tokens-updated] - -concurrency: - group: sync-design-tokens - cancel-in-progress: true - -permissions: - contents: write - -env: - TOKENS_REPO: SWYP-Find/design-tokens - TOKENS_BRANCH: main - TOKENS_FILE: Mode 1.tokens.json - LOCAL_JSON_PATH: Projects/Shared/DesignSystem/Resources/Mode 1.tokens.json - TARGET_BRANCH: develop - -jobs: - sync: - runs-on: ubuntu-latest - steps: - - name: Checkout iOS repo - uses: actions/checkout@v5 - with: - ref: ${{ env.TARGET_BRANCH }} - fetch-depth: 0 - - - name: Setup Swift - uses: swift-actions/setup-swift@v2 - with: - swift-version: '5.10' - - - name: Download tokens JSON from design-tokens repo (public) - run: | - set -euo pipefail - ENCODED=$(python3 -c "import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1]))" "${TOKENS_FILE}") - curl -fsSL \ - "https://raw.githubusercontent.com/${TOKENS_REPO}/${TOKENS_BRANCH}/${ENCODED}" \ - -o "${LOCAL_JSON_PATH}" - echo "[sync] downloaded $(wc -c < "${LOCAL_JSON_PATH}") bytes" - - - name: Run TokenGenerator - run: swift Tools/TokenGenerator.swift - - - name: Commit and push directly to target branch - run: | - set -euo pipefail - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - # JSON 원본(LOCAL_JSON_PATH)은 design-tokens 레포가 단일 소스이므로 커밋하지 않음 - git add \ - "Projects/Shared/DesignSystem/Sources/Color/ShapeStyle+.swift" \ - "Projects/Shared/DesignSystem/Sources/Extension/CGFloat/CGFloat+Radius+.swift" \ - "Projects/Shared/DesignSystem/Sources/Extension/CGFloat/CGFloat+Spacing+.swift" \ - "Projects/Shared/DesignSystem/Sources/UI/Token/ComponentToken.swift" || true - if git diff --cached --quiet; then - echo "[sync] 변경사항 없음 — 커밋 건너뜀" - exit 0 - fi - git diff --cached --stat - git commit -m "chore: design-tokens 동기화 자동 코드젠 #24" - git push origin HEAD:${TARGET_BRANCH} - echo "[sync] ${TARGET_BRANCH} 에 직접 push 완료"