-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (34 loc) · 1.14 KB
/
sync.yml
File metadata and controls
43 lines (34 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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 }}