2024-06-29 11:27:56 +08:00
|
|
|
name: Publish Any Commit
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- run: corepack enable
|
2024-08-18 00:23:19 +08:00
|
|
|
- uses: oven-sh/setup-bun@v2
|
2024-06-29 11:27:56 +08:00
|
|
|
|
|
|
|
- name: Install dependencies
|
2024-08-18 00:23:19 +08:00
|
|
|
run: bun install
|
2024-06-29 11:27:56 +08:00
|
|
|
|
|
|
|
- name: Build
|
2024-08-18 00:23:19 +08:00
|
|
|
run: bun run build
|
2024-06-29 11:27:56 +08:00
|
|
|
|
2024-07-12 16:38:49 +08:00
|
|
|
# ========== Prepare examples ==========
|
|
|
|
- name: Clear examples
|
|
|
|
run: rm -rf examples
|
|
|
|
|
|
|
|
- name: Clone examples
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
repository: ant-design/ant-design-examples
|
|
|
|
path: examples
|
|
|
|
|
|
|
|
- name: Modify examples
|
2024-08-18 00:23:19 +08:00
|
|
|
run: bunx tsx scripts/prepare-examples.ts
|
2024-07-12 16:38:49 +08:00
|
|
|
|
2024-08-18 00:23:19 +08:00
|
|
|
- run: bunx pkg-pr-new publish --template './examples/examples/*'
|