Sync antd data #593
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
| name: Sync antd data | |
| on: | |
| schedule: | |
| - cron: '37 * * * *' # Hourly at :37 | |
| workflow_dispatch: # Manual trigger | |
| permissions: | |
| contents: write | |
| id-token: write # npm OIDC Trusted Publishing + provenance | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: npm ci | |
| - name: Check if sync needed | |
| id: check-version | |
| run: npx tsx scripts/check-sync-needed.ts | |
| - name: Clone antd repo (shallow, filter tree) | |
| if: steps.check-version.outputs.needs_sync == 'true' | |
| run: | | |
| git clone --filter=tree:0 --no-checkout \ | |
| https://github.com/ant-design/ant-design.git antd-source | |
| - name: Sync v4, v5, v6 metadata | |
| if: steps.check-version.outputs.needs_sync == 'true' | |
| run: npx tsx scripts/sync.ts --antd-dir antd-source | |
| - name: Build and publish | |
| if: steps.check-version.outputs.needs_publish == 'true' | |
| run: npx tsx scripts/publish.ts | |
| env: | |
| GH_TOKEN: ${{ github.token }} |