diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index e9de774fa3e5..000000000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1,13 +0,0 @@ -# Contributing to Ant Design - -Want to contribute to Ant Design? There are a few things you need to know. - -We wrote a **[contribution guide](https://ant.design/docs/react/contributing)** to help you get started. - ---- - -# 参与共建 - -想要给 Ant Design 贡献自己的一份力量? - -我们写了一份 **[贡献指南](https://ant.design/docs/react/contributing-cn)** 来帮助你开始。 diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 3cd913b22730..000000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,5 +0,0 @@ -# These are supported funding model platforms - -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -open_collective: ant-design -issuehunt: ant-design/ant-design diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 6d65a8907e93..000000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,15 +0,0 @@ - - - diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 10f81b3670c8..000000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,8 +0,0 @@ -blank_issues_enabled: true -contact_links: - - name: 🆕 Create new issue - url: http://new-issue.ant.design - about: The issue which is not created via http://new-issue.ant.design will be closed immediately. - - name: 🆕 创建一个新 Issue - url: http://new-issue.ant.design - about: 不是用 http://new-issue.ant.design 创建的 issue 会被机器人自动关闭。另外『如何使用...』类问题建议使用讨论区 https://github.com/ant-design/ant-design/discussions diff --git a/.github/ISSUE_TEMPLATE/template-1-bug-report.yml.close b/.github/ISSUE_TEMPLATE/template-1-bug-report.yml.close deleted file mode 100644 index 005df9e64953..000000000000 --- a/.github/ISSUE_TEMPLATE/template-1-bug-report.yml.close +++ /dev/null @@ -1,99 +0,0 @@ -name: 🇨🇳 报告缺陷(beta) -description: 使用中文 Bug 报告模板提交一个缺陷,当然你也可以用 https://new-issue.ant.design -title: "[Bug] 请替换成合适的标题" -labels: ["🐛+Bug"] -body: - - type: markdown - attributes: - value: | - 除了此表单,你也可以使用 [Ant Design Issue Helper](https://new-issue.ant.design/) 来新建 issue。 - - Ant Design 的 issue 列表只接受 [Bug 报告](https://github.com/ant-design/ant-design/issues/new?assignees=&labels=%F0%9F%90%9B+Bug&template=template-1-bug-report.yml&title=%5BBug%5D+) 或是 [新功能请求](https://github.com/ant-design/ant-design/issues/new?assignees=&labels=%F0%9F%92%A1%2BFeature%2BRequest&template=template-2-feature-request.yml&title=%5BFeature+Request%5D+) (Feature Request)。这意味着我们不接受用法问题(How to 类问题)。如果你开的 issue 不符合规定,它将会被立刻关闭。[为什么要这么严格?](https://github.com/ant-design/antd-issue-helper/blob/master/src/locales/zh/introModal.md) - - 对于使用中遇到的问题,请使用以下资源: - - - 将用法类问题发到 [GitHub 讨论区](https://github.com/ant-design/ant-design/discussions) 而不是 Issue。 - - 仔细阅读 [使用文档](https://ant.design/docs/react/introduce-cn) 和 [组件文档](https://ant.design/components/overview-cn/)。 - - 提问前确保你在 [常见问题](https://ant.design/docs/react/faq-cn) 和 [更新日志](https://ant.design/changelog-cn) 中搜索过。 - - 在 [StackOverflow](https://stackoverflow.com/questions/tagged/antd) (英文) 或是 [SegmentFault](https://segmentfault.com/t/antd)(中文)搜索和提问。 - - 最后,在开 issue 前,可以先搜索一下以往的旧 issue - 你遇到的问题可能已经有人提了,也可能已经在最新版本中被修正。注意:如果你发现一个已经关闭的旧 issue 在最新版本中仍然存在,请不要在旧 issue 下面留言,而应该用下面的表单开一个新的 issue。 - - --- - - type: input - id: reproduce - attributes: - label: 重现链接 - description: 请提供一个尽可能精简的 [codesandbox](https://u.ant.design/codesandbox-repro) 或 [GitHub 仓库](https://github.com/ant-design/create-react-app-antd/) 的链接。[什么是最小化重现,为什么这是必需的?](https://github.com/ant-design/antd-issue-helper/blob/master/src/locales/zh/reproModal.md) - validations: - required: true - - type: input - id: version - attributes: - label: antd 版本 - description: 你正在使用的 antd 版本是多少?(注意不是 package.json 里的版本,而是 node_modules/antd 里实际安装的版本) - placeholder: 如 4.16.13 - validations: - required: true - - type: textarea - id: reproduce-steps - attributes: - label: 重现步骤 - description: 请提供一个傻瓜式的操作步骤,方便我们无脑重现问题。 - placeholder: | - 比如: - 1. 点击重现链接里的主按钮 - 2. 等待五秒钟 - 3. 观察按钮的边框 - validations: - required: true - - type: textarea - id: expected - attributes: - label: 期望的结果是什么? - placeholder: 比如:按钮样式正常,边框一直存在 - validations: - required: true - - type: textarea - id: reality - attributes: - label: 实际的结果是什么? - placeholder: 比如:按钮样式异常,边框突然丢失 - validations: - required: true - - type: dropdown - id: browsers - attributes: - label: 浏览器 - description: 在哪些浏览器上能重现这个问题? - multiple: true - options: - - Firefox - - Chrome - - Safari - - Edge - - Internet Explorer - - Others - - type: input - id: browsers-version - attributes: - label: 浏览器版本 - placeholder: 如:版本 95.0.4638.69(正式版本) (x86_64) - - type: dropdown - id: os - attributes: - label: 操作系统 - description: 使用的操作系统是? - options: - - Windows - - MacOS - - iOS - - Android - - Others - - type: input - id: hidden-tag - attributes: - label: 其他 - description: 不要删除预填内容,否则 issue 会被自动关闭。 - value: - diff --git a/.github/ISSUE_TEMPLATE/template-2-feature-request.yml.close b/.github/ISSUE_TEMPLATE/template-2-feature-request.yml.close deleted file mode 100644 index b9e18c2028aa..000000000000 --- a/.github/ISSUE_TEMPLATE/template-2-feature-request.yml.close +++ /dev/null @@ -1,50 +0,0 @@ -name: 🇨🇳 功能需求(beta) -description: 使用中文 Bug 报告模板提交一个功能需求,当然你也可以用 https://new-issue.ant.design -title: "[Feature Request] 请替换成合适的标题" -labels: ["💡+Feature+Request"] -body: - - type: markdown - attributes: - value: | - 除了此表单,你也可以使用 [Ant Design Issue Helper](https://new-issue.ant.design/) 来新建 issue。 - - Ant Design 的 issue 列表只接受 [Bug 报告](https://github.com/ant-design/ant-design/issues/new?assignees=&labels=%F0%9F%90%9B+Bug&template=template-1-bug-report.yml&title=%5BBug%5D+) 或是 [新功能请求](https://github.com/ant-design/ant-design/issues/new?assignees=&labels=%F0%9F%92%A1%2BFeature%2BRequest&template=template-2-feature-request.yml&title=%5BFeature+Request%5D+) (Feature Request)。这意味着我们不接受用法问题(How to 类问题)。如果你开的 issue 不符合规定,它将会被立刻关闭。[为什么要这么严格?](https://github.com/ant-design/antd-issue-helper/blob/master/src/locales/zh/introModal.md) - - 对于使用中遇到的问题,请使用以下资源: - - - 将用法类问题发到 [GitHub 讨论区](https://github.com/ant-design/ant-design/discussions) 而不是 Issue。 - - 仔细阅读 [使用文档](https://ant.design/docs/react/introduce-cn) 和 [组件文档](https://ant.design/components/overview-cn/)。 - - 提问前确保你在 [常见问题](https://ant.design/docs/react/faq-cn) 和 [更新日志](https://ant.design/changelog-cn) 中搜索过。 - - 在 [StackOverflow](https://stackoverflow.com/questions/tagged/antd) (英文) 或是 [SegmentFault](https://segmentfault.com/t/antd)(中文)搜索和提问。 - - 最后,在开 issue 前,可以先搜索一下以往的旧 issue - 你遇到的问题可能已经有人提了,也可能已经在最新版本中被修正。注意:如果你发现一个已经关闭的旧 issue 在最新版本中仍然存在,请不要在旧 issue 下面留言,而应该用下面的表单开一个新的 issue。 - - --- - - type: textarea - id: needs - attributes: - label: 这个功能解决了什么问题? - description: | - 请尽可能详尽地说明这个需求的用例和场景。最重要的是:解释清楚是怎样的用户体验需求催生了这个功能上的需求。 - Ant Design 的一个重要设计原则是保持 API 的简洁和直接。通常来说,我们只考虑添加在现有的 API 下无法轻松实现的功能。新功能的用例也应当足够常见。 - validations: - required: true - - type: textarea - id: api - attributes: - label: 你期望的 API 是怎样的? - description: | - 描述一下你期望这个新功能的 API 是如何使用的,并提供一些代码示例。请用 Markdown 格式化你的代码片段。 - 如果有新的 UI 界面,最好截图展示你期望的界面是什么样的? - placeholder: | - ```jsx - } {...props} /> - ``` - validations: - required: true - - type: input - id: hidden-tag - attributes: - label: 其他 - description: 不要删除预填内容,否则 issue 会被自动关闭。 - value: diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index d3c57bc58f6c..000000000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,66 +0,0 @@ - - -[[中文版模板 / Chinese template](https://github.com/ant-design/ant-design/blob/master/.github/PULL_REQUEST_TEMPLATE/pr_cn.md)] - -### 🤔 This is a ... - -- [ ] New feature -- [ ] Bug fix -- [ ] Site / documentation update -- [ ] Demo update -- [ ] Component style update -- [ ] TypeScript definition update -- [ ] Bundle size optimization -- [ ] Performance optimization -- [ ] Enhancement feature -- [ ] Internationalization -- [ ] Refactoring -- [ ] Code style optimization -- [ ] Test Case -- [ ] Branch merge -- [ ] Other (about what?) - -### 🔗 Related issue link - - - -### 💡 Background and solution - - - -### 📝 Changelog - - - -| Language | Changelog | -| ---------- | --------- | -| 🇺🇸 English | | -| 🇨🇳 Chinese | | - -### ☑️ Self-Check before Merge - -⚠️ Please check all items below before requesting a reviewing. ⚠️ - -- [ ] Doc is updated/provided or not needed -- [ ] Demo is updated/provided or not needed -- [ ] TypeScript definition is updated/provided or not needed -- [ ] Changelog is provided or not needed diff --git a/.github/PULL_REQUEST_TEMPLATE/pr_cn.md b/.github/PULL_REQUEST_TEMPLATE/pr_cn.md deleted file mode 100644 index 9c98de787e47..000000000000 --- a/.github/PULL_REQUEST_TEMPLATE/pr_cn.md +++ /dev/null @@ -1,61 +0,0 @@ - - -[[English Template / 英文模板](https://github.com/ant-design/ant-design/blob/master/.github/PULL_REQUEST_TEMPLATE.md)] - -### 🤔 这个变动的性质是? - -- [ ] 新特性提交 -- [ ] 日常 bug 修复 -- [ ] 站点、文档改进 -- [ ] 演示代码改进 -- [ ] 组件样式/交互改进 -- [ ] TypeScript 定义更新 -- [ ] 包体积优化 -- [ ] 性能优化 -- [ ] 功能增强 -- [ ] 国际化改进 -- [ ] 重构 -- [ ] 代码风格优化 -- [ ] 测试用例 -- [ ] 分支合并 -- [ ] 其他改动(是关于什么的改动?) - -### 🔗 相关 Issue - - - -### 💡 需求背景和解决方案 - - - -### 📝 更新日志 - - - -| 语言 | 更新描述 | -| ------- | -------- | -| 🇺🇸 英文 | | -| 🇨🇳 中文 | | - -### ☑️ 请求合并前的自查清单 - -⚠️ 请自检并全部**勾选全部选项**。⚠️ - -- [ ] 文档已补充或无须补充 -- [ ] 代码演示已提供或无须提供 -- [ ] TypeScript 定义已补充或无须补充 -- [ ] Changelog 已提供或无须提供 diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 0d4d1732277a..000000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,41 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: "npm" # See documentation for possible values - directory: "/" # Location of package manifests - schedule: - interval: "daily" - ignore: - - dependency-name: "rc-cascader" - - dependency-name: "rc-checkbox" - - dependency-name: "rc-collapse" - - dependency-name: "rc-dialog" - - dependency-name: "rc-drawer" - - dependency-name: "rc-dropdown" - - dependency-name: "rc-field-form" - - dependency-name: "rc-image" - - dependency-name: "rc-mentions" - - dependency-name: "rc-menu" - - dependency-name: "rc-motion" - - dependency-name: "rc-notification" - - dependency-name: "rc-picker" - - dependency-name: "rc-progress" - - dependency-name: "rc-rate" - - dependency-name: "rc-resize-observer" - - dependency-name: "rc-select" - - dependency-name: "rc-slider" - - dependency-name: "rc-steps" - - dependency-name: "rc-switch" - - dependency-name: "rc-table" - - dependency-name: "rc-tabs" - - dependency-name: "rc-textarea" - - dependency-name: "rc-tooltip" - - dependency-name: "rc-tree" - - dependency-name: "rc-tree-select" - - dependency-name: "rc-trigger" - - dependency-name: "rc-upload" - - dependency-name: "rc-util" diff --git a/.github/lock.yml b/.github/lock.yml deleted file mode 100644 index e5b9a627f1e1..000000000000 --- a/.github/lock.yml +++ /dev/null @@ -1,14 +0,0 @@ -# Configuration for lock-threads - https://github.com/dessant/lock-threads - -# Number of days of inactivity before a closed issue or pull request is locked -daysUntilLock: 365 -# Comment to post before locking. Set to `false` to disable -lockComment: > - This thread has been automatically locked because it has not had recent - activity. Please open a new issue for related bugs and link to relevant - comments in this thread. -# Issues or pull requests with these labels will not be locked -# exemptLabels: -# - no-locking -# Limit to only `issues` or `pulls` -only: issues diff --git a/.github/tests_checker.yml b/.github/tests_checker.yml deleted file mode 100644 index 46378d7461df..000000000000 --- a/.github/tests_checker.yml +++ /dev/null @@ -1,3 +0,0 @@ -comment: 'Could you please add tests to make sure this change works as expected?', -fileExtensions: [.ts', '.tsx', '.json'] -testDir: '__tests__' diff --git a/.github/workflows/codeball.yml b/.github/workflows/codeball.yml deleted file mode 100644 index 1e796958b02b..000000000000 --- a/.github/workflows/codeball.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Codeball -on: - pull_request: {} - pull_request_review_comment: - types: [created, edited] - -jobs: - codeball_job: - runs-on: ubuntu-latest - name: Codeball - steps: - # Run Codeball on all new Pull Requests and Review Comments! 🚀 - # For customizations and more documentation, see https://github.com/sturdy-dev/codeball-action - - name: Codeball - uses: sturdy-dev/codeball-action@v2 - with: - # Settings for "Codeball Approver" - approvePullRequests: "false" - labelPullRequestsWhenApproved: "true" - labelPullRequestsWhenReviewNeeded: "true" - failJobsWhenReviewNeeded: "false" diff --git a/.github/workflows/compressed-size.yml b/.github/workflows/compressed-size.yml deleted file mode 100644 index 34f234d3ebeb..000000000000 --- a/.github/workflows/compressed-size.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: 📦 Compressed Size - -on: - pull_request: - types: [opened, synchronize] - -# Cancel prev CI if new commit come -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - compressed-size: - permissions: - contents: read # for actions/checkout to fetch code - pull-requests: write # for preactjs/compressed-size-action to create PR comments - runs-on: ubuntu-latest - env: - CI_JOB_NUMBER: 1 - - steps: - - uses: actions/checkout@v3 - - uses: preactjs/compressed-size-action@v2 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - pattern: "./dist/**/*.min.{js,css}" - build-script: "dist:esbuild-no-dup-check" - clean-script: "clean-lockfiles" diff --git a/.github/workflows/disscustion-open-check.yml b/.github/workflows/disscustion-open-check.yml deleted file mode 100644 index 1908b1acdc05..000000000000 --- a/.github/workflows/disscustion-open-check.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Discussions - -on: - discussion: - types: [created] - -permissions: - contents: read - -jobs: - discussion-create: - permissions: - contents: read # for visiky/dingtalk-release-notify to get latest release - runs-on: ubuntu-latest - steps: - - name: send to dingtalk - uses: visiky/dingtalk-release-notify@main - with: - DING_TALK_TOKEN: ${{ secrets.DINGDING_BOT_TOKEN }} - notify_title: '🔥 @${{ github.event.discussion.user.login }} 创建了讨论:${{ github.event.discussion.title }}' - notify_body: '### 🔥 @${{ github.event.discussion.user.login }} 创建了讨论:[${{ github.event.discussion.title }}](${{ github.event.discussion.html_url }})
![](https://gw.alipayobjects.com/zos/antfincdn/5Cl2G7JjF/jieping2022-03-20%252520xiawu11.06.04.png)' - notify_footer: '> 💬 欢迎前往 GitHub 进行讨论,社区可能需要你的帮助。' - at_all: false # whether to ding everybody diff --git a/.github/workflows/issue-check-inactive.yml b/.github/workflows/issue-check-inactive.yml deleted file mode 100644 index 9a7973100410..000000000000 --- a/.github/workflows/issue-check-inactive.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Issue Check Inactive - -on: - schedule: - - cron: "0 0 */15 * *" - -permissions: - contents: read - -jobs: - issue-check-inactive: - permissions: - issues: write # for actions-cool/issues-helper to update issues - pull-requests: write # for actions-cool/issues-helper to update PRs - runs-on: ubuntu-latest - steps: - - name: check-inactive - uses: actions-cool/issues-helper@v3 - with: - actions: 'check-inactive' - inactive-label: 'Inactive' - inactive-day: 30 diff --git a/.github/workflows/issue-close-require.yml b/.github/workflows/issue-close-require.yml deleted file mode 100644 index be27eb3d862a..000000000000 --- a/.github/workflows/issue-close-require.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Issue Close Require - -on: - schedule: - - cron: "0 0 * * *" - -permissions: - contents: read - -jobs: - issue-close-require: - permissions: - issues: write # for actions-cool/issues-helper to update issues - pull-requests: write # for actions-cool/issues-helper to update PRs - runs-on: ubuntu-latest - steps: - - name: need reproduce - uses: actions-cool/issues-helper@v3 - with: - actions: 'close-issues' - labels: '🤔 Need Reproduce' - inactive-day: 3 - - - name: needs more info - uses: actions-cool/issues-helper@v3 - with: - actions: 'close-issues' - labels: 'needs-more-info' - inactive-day: 3 - body: | - Since the issue was labeled with `needs-more-info`, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply. - - 由于该 issue 被标记为需要更多信息,却 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。 diff --git a/.github/workflows/issue-labeled.yml b/.github/workflows/issue-labeled.yml deleted file mode 100644 index 6fc3d2f19f3a..000000000000 --- a/.github/workflows/issue-labeled.yml +++ /dev/null @@ -1,88 +0,0 @@ -# Origin Source -# https://github.com/ant-design/ant-design/blob/79f566b7f8abb1012ef55b0d2793bfdf5595b85d/.github/workflows/issue-reply.yml -name: Issue Labeled - -on: - issues: - types: [labeled] - -permissions: - contents: read - -jobs: - issue-labeled: - permissions: - issues: write # for actions-cool/issues-helper to update issues - pull-requests: write # for actions-cool/issues-helper to update PRs - runs-on: ubuntu-latest - steps: - - name: help wanted - if: github.event.label.name == 'help wanted' - uses: actions-cool/issues-helper@v3 - with: - actions: 'create-comment' - token: ${{ secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.issue.number }} - body: | - Hello @${{ github.event.issue.user.login }}. We totally like your proposal/feedback, welcome to [send us a Pull Request](https://help.github.com/en/articles/creating-a-pull-request) for it. Please send your Pull Request to proper branch (feature branch for the new feature, master for bugfix and other changes), fill the [Pull Request Template](https://github.com/ant-design/ant-design/blob/master/.github/PULL_REQUEST_TEMPLATE.md) here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution! - - 你好 @${{ github.event.issue.user.login }},我们完全同意你的提议/反馈,欢迎直接在此仓库 [创建一个 Pull Request](https://help.github.com/en/articles/creating-a-pull-request) 来解决这个问题。请将 Pull Request 发到正确的分支(新特性发到 feature 分支,其他发到 master 分支),务必填写 Pull Request 内的[预设模板](https://github.com/ant-design/ant-design/blob/master/.github/PULL_REQUEST_TEMPLATE.md),提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。 - - ![giphy](https://user-images.githubusercontent.com/507615/62342668-4735dc00-b51a-11e9-92a7-d46fbb1cc0c7.gif) - - - name: 🤔 Need Reproduce - if: github.event.label.name == '🤔 Need Reproduce' - uses: actions-cool/issues-helper@v3 - with: - actions: 'create-comment' - token: ${{ secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.issue.number }} - body: | - Hello @${{ github.event.issue.user.login }}. Please provide a online reproduction by forking this link https://u.ant.design/codesandbox-repro or a minimal GitHub repository. Issues labeled by `Need Reproduce` will be closed if no activities in 3 days. - - 你好 @${{ github.event.issue.user.login }}, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 [此处](https://u.ant.design/codesandbox-repro) 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。3 天内未跟进此 issue 将会被自动关闭。 - - ![](https://gw.alipayobjects.com/zos/antfincdn/y9kwg7DVCd/reproduce.gif) - - - name: Usage - if: github.event.label.name == 'Usage' || github.event.label.name == 'Question' - uses: actions-cool/issues-helper@v3 - with: - actions: 'create-comment,close-issue' - token: ${{ secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.issue.number }} - body: | - Hello @${{ github.event.issue.user.login }}, we use GitHub issues to trace bugs or discuss plans of Ant Design. So, please [don't ask usage questions](https://github.com/ant-design/ant-design/issues/2320) here. You can try to open a new discussion in [antd discussions](https://github.com/ant-design/ant-design/discussions), select `Q&A` to ask questions, also can ask questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/antd) or [Segment Fault](https://segmentfault.com/t/antd), then apply tag `antd` and `react` to your question. - - 你好 @${{ github.event.issue.user.login }},Ant Design Issue 板块是用于 bug 反馈与需求讨论的地方。请[勿询问如何使用的问题](https://github.com/ant-design/ant-design/issues/2320),你可以试着在 [antd discussions](https://github.com/ant-design/ant-design/discussions) 新开一个 discussion,选择 `Q&A` 类别进行提问,也可以在 [Stack Overflow](http://stackoverflow.com/questions/tagged/antd) 或者 [Segment Fault](https://segmentfault.com/t/antd) 中提问(记得添加 `antd` 和 `react` 标签哦~)。 - - - name: 3.x - if: github.event.label.name == '3.x' - uses: actions-cool/issues-helper@v3 - with: - actions: 'create-comment,close-issue' - token: ${{ secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.issue.number }} - body: | - Hi @${{ github.event.issue.user.login }}. Current version (3.x) is off the maintenance period. We may not accept pull request or fix bug with it anymore. This topic will be auto closed. - - 你好 @${{ github.event.issue.user.login }},当前版本(3.x)已经过了维护期。我们不会再接受对其的相关 PR 与 issue。当前 topic 会被自动关闭。 - - - name: invalid - if: github.event.label.name == 'Invalid' - uses: actions-cool/issues-helper@v3 - with: - actions: 'create-comment,close-issue' - token: ${{ secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.issue.number }} - body: | - Hello @${{ github.event.issue.user.login }}, your issue has been closed because it does not conform to our issue requirements. Please use the [Issue Helper](http://new-issue.ant.design) to create an issue, thank you! - - 你好 @${{ github.event.issue.user.login }},为了能够进行高效沟通,我们对 issue 有一定的格式要求,你的 issue 因为不符合要求而被自动关闭。你可以通过 [issue 助手](http://new-issue.ant.design) 来创建 issue 以方便我们定位错误。谢谢配合! - - - name: rtl - if: github.event.label.name == 'rtl' - uses: actions-cool/issues-helper@v3 - with: - actions: 'add-assignees' - assignees: 'xrkffgg' diff --git a/.github/workflows/issue-open-check.yml b/.github/workflows/issue-open-check.yml deleted file mode 100644 index 8c9de23eddee..000000000000 --- a/.github/workflows/issue-open-check.yml +++ /dev/null @@ -1,96 +0,0 @@ -name: Issue Open Check - -on: - issues: - types: [opened] - -permissions: - contents: read - -jobs: - issue-open-check: - permissions: - contents: read # for visiky/dingtalk-release-notify to get latest release - issues: write # for actions-cool/issues-helper to update issues - pull-requests: write # for actions-cool/issues-helper to update PRs - runs-on: ubuntu-latest - steps: - - uses: actions-cool/check-user-permission@v2 - id: checkUser - with: - require: 'write' - check-bot: true - - - name: check invalid - if: (contains(github.event.issue.body, 'ant-design-issue-helper') == false) && (steps.checkUser.outputs.require-result == 'false') - uses: actions-cool/issues-helper@v3 - with: - actions: 'create-comment,add-labels,close-issue' - issue-number: ${{ github.event.issue.number }} - labels: 'Invalid' - body: | - Hello @${{ github.event.issue.user.login }}, your issue has been closed because it does not conform to our issue requirements. Please use the [Issue Helper](http://new-issue.ant.design) to create an issue, thank you! - - 你好 @${{ github.event.issue.user.login }},为了能够进行高效沟通,我们对 issue 有一定的格式要求,你的 issue 因为不符合要求而被自动关闭。你可以通过 [issue 助手](http://new-issue.ant.design) 来创建 issue 以方便我们定位错误。谢谢配合! - - - name: check website - uses: actions-cool/issues-helper@v3 - id: checkid - with: - actions: 'check-issue' - issue-number: ${{ github.event.issue.number }} - # 格式如:'x1,x2' or 'x1,x2/y1,y2' 最多支持 2 个数组 - title-includes: '官网,网站,国内,镜像,mobile ant design,mobile.ant.design,ant design,ant design pro,pro.ant.design/挂了,挂掉了,无法访问,不能访问,访问不了,出问题,打不开,登不上,can not open,cannot open,can not be reached' - - - name: deal website - if: steps.checkid.outputs.check-result == 'true' - uses: actions-cool/issues-helper@v3 - with: - actions: 'create-comment,close-issue' - issue-number: ${{ github.event.issue.number }} - body: | - Ant Design 系列官网由于某些众所周知的原因无法访问,建议翻墙或访问国内镜像站点。 - - ## 官网 - * Ant Design: https://ant.design - * Ant Design Pro: https://pro.ant.design - * Ant Design Pro Preview : https://preview.pro.ant.design - * Ant Design Mobile: https://mobile.ant.design - * Ant Motion: https://motion.ant.design - - ## 国内镜像 - * 官方镜像: https://ant-design.antgroup.com/ - * Gitee 镜像: http://ant-design.gitee.io - * Ant Design 3.x: http://ant-design-3x.gitee.io - * Ant Design 2.x: http://ant-design-2x.gitee.io - * Ant Design 1.x: http://ant-design-1x.gitee.io - * Ant Design Pro: http://ant-design-pro.gitee.io - * Ant Design Mobile: http://antd-mobile.gitee.io - * Ant Motion: http://ant-motion.gitee.io - * Ant Design Pro Preview : https://prosite.z23.web.core.windows.net - - - name: check ie - if: contains(github.event.issue.body, 'ant-design-issue-helper') == true && contains(github.event.issue.title, 'IE9') == true || contains(github.event.issue.title, 'IE 9') == true || contains(github.event.issue.title, 'IE10') == true || contains(github.event.issue.title, 'IE 10') == true || contains(github.event.issue.title, 'IE11') == true || contains(github.event.issue.title, 'IE 11') == true || contains(github.event.issue.title, 'Internet Explorer') == true || contains(github.event.issue.body, 'IE9') == true || contains(github.event.issue.body, 'IE 9') == true || contains(github.event.issue.body, 'IE10') == true || contains(github.event.issue.body, 'IE 10') == true || contains(github.event.issue.body, 'IE11') == true || contains(github.event.issue.body, 'IE 11') == true || contains(github.event.issue.body, 'Internet Explorer') == true - uses: actions-cool/issues-helper@v3 - with: - actions: 'add-labels' - issue-number: ${{ github.event.issue.number }} - labels: 'IE | Firefox | Safari,Internet Explorer' - - - name: check ie11- - if: contains(github.event.issue.body, 'ant-design-issue-helper') == true && contains(github.event.issue.title, 'IE9') == true || contains(github.event.issue.title, 'IE 9') == true || contains(github.event.issue.title, 'IE10') == true || contains(github.event.issue.title, 'IE 10') == true || contains(github.event.issue.body, 'IE9') == true || contains(github.event.issue.body, 'IE 9') == true || contains(github.event.issue.body, 'IE10') == true || contains(github.event.issue.body, 'IE 10') == true - uses: actions-cool/issues-helper@v3 - with: - actions: 'create-comment, close-issue' - issue-number: ${{ github.event.issue.number }} - body: | - Hello @${{ github.event.issue.user.login }}, v4 only support IE11 and above. - - - name: send to dingtalk - uses: visiky/dingtalk-release-notify@main - with: - DING_TALK_TOKEN: ${{ secrets.DINGDING_BOT_TOKEN }} - notify_title: '🔥 @${{ github.event.issue.user.login }} 创建了 issue:${{ github.event.issue.title }}' - notify_body: '### 🔥 @${{ github.event.issue.user.login }} 创建了 issue:[${{ github.event.issue.title }}](${{ github.event.issue.html_url }})
![](https://gw.alipayobjects.com/zos/antfincdn/5Cl2G7JjF/jieping2022-03-20%252520xiawu11.06.04.png)' - notify_footer: '> 💬 欢迎前往 GitHub 进行讨论,社区可能需要你的帮助。' - at_all: false # whether to ding everybody diff --git a/.github/workflows/issue-remove-inactive.yml b/.github/workflows/issue-remove-inactive.yml deleted file mode 100644 index d52e84f39f8b..000000000000 --- a/.github/workflows/issue-remove-inactive.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Issue Remove Inactive - -on: - issues: - types: [edited] - issue_comment: - types: [created, edited] - -permissions: - contents: read - -jobs: - issue-remove-inactive: - permissions: - issues: write # for actions-cool/issues-helper to update issues - pull-requests: write # for actions-cool/issues-helper to update PRs - runs-on: ubuntu-latest - steps: - - name: remove inactive - if: github.event.issue.state == 'open' && github.actor == github.event.issue.user.login - uses: actions-cool/issues-helper@v3 - with: - actions: 'remove-labels' - issue-number: ${{ github.event.issue.number }} - labels: 'Inactive, needs-more-info' diff --git a/.github/workflows/issues-similarity-analysis.yml b/.github/workflows/issues-similarity-analysis.yml deleted file mode 100644 index 4da16e7f2f76..000000000000 --- a/.github/workflows/issues-similarity-analysis.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Issues Similarity Analysis - -on: - issues: - types: [opened, edited] - -permissions: - contents: read - -jobs: - similarity-analysis: - permissions: - issues: write # for actions-cool/issues-similarity-analysis to create issue comments - runs-on: ubuntu-latest - steps: - - name: analysis - uses: actions-cool/issues-similarity-analysis@v1 - with: - filter-threshold: 0.5 - title-excludes: '' - comment-title: '### You may look for issues:' - comment-body: '${index}. ${similarity} #${number}' diff --git a/.github/workflows/pr-check-ci.yml b/.github/workflows/pr-check-ci.yml deleted file mode 100644 index b065fa90d9c6..000000000000 --- a/.github/workflows/pr-check-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# Used to merge master/feature branches with each other -name: PR Check CI - -on: - schedule: - - cron: "*/5 * * * *" - -permissions: - contents: read - -jobs: - pr-check-ci: - permissions: - checks: read # for actions-cool/check-pr-ci to get check reference - contents: write # for actions-cool/check-pr-ci to merge PRs - issues: write # for actions-cool/check-pr-ci to update issues - pull-requests: write # for actions-cool/check-pr-ci to update PRs - runs-on: ubuntu-latest - steps: - - uses: actions-cool/check-pr-ci@v1 - with: - filter-label: 'BranchAutoMerge' - filter-creator-authority: 'write' - filter-head-ref: 'master, feature, next, master-merge-feature, feature-merge-master, next-merge-master, next-merge-feature' - filter-support-fork: false - skip-run-names: 'deploy preview, pr-check-ci, build preview failed, suggest-related-links' - conflict-review-body: '😅 This branch has conflicts that must be resolved!' - success-review: true - success-merge: true - merge-method: 'merge' - merge-title: 'chore: auto merge branches (#${number})' diff --git a/.github/workflows/pr-check-merge.yml b/.github/workflows/pr-check-merge.yml deleted file mode 100644 index 8f628af60208..000000000000 --- a/.github/workflows/pr-check-merge.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: PR Check Merge - -on: - pull_request_target: - types: [opened] - -permissions: - contents: read - -jobs: - pr-check-merge: - permissions: - issues: write # for actions-cool/issues-helper to update issues - pull-requests: write # for actions-cool/issues-helper to update PRs - runs-on: ubuntu-latest - if: (github.event.pull_request.head.ref == 'feature' || github.event.pull_request.head.ref == 'master') && github.event.pull_request.head.user.login == 'ant-design' - steps: - - uses: actions-cool/issues-helper@v3 - with: - actions: 'create-comment' - issue-number: ${{ github.event.number }} - body: | - Hi @${{ github.event.pull_request.user.login }}。 - - **请注意**,当前 PR 是分支间的互相合并,请使用 `BranchAutoMerge` 标签来进行自动合并。切记**不要、不要、不要使用 `Squash`**。 diff --git a/.github/workflows/pr-open-check.yml b/.github/workflows/pr-open-check.yml deleted file mode 100644 index 19a3bed997ce..000000000000 --- a/.github/workflows/pr-open-check.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: PR Open Check - -on: - pull_request_target: - types: [opened, edited, reopened, synchronize] - -permissions: - contents: read - -jobs: - refuse: - permissions: - issues: write # for actions-cool/pr-welcome to create, update & react on issues - pull-requests: write # for actions-cool/pr-welcome to request reviewer - runs-on: ubuntu-latest - steps: - - uses: actions-cool/pr-welcome@v1 - with: - refuse-issue-label: '🎱 Collaborate PR only' - need-creator-authority: 'write' - comment: | - Hi @${{ github.event.pull_request.user.login }}. The issue mentioned in this PR needs to be confirmed with the designer or core team. This PR is temporarily not accepted. Thank you again for your contribution! 😊 - - 你好 @${{ github.event.pull_request.user.login }}。这个 PR 提及的 issue 需要和设计师或核心团队进行确认,暂时不接受 PR,再次感谢你的贡献!😊 - close: true - - check-changelog: - permissions: - pull-requests: write # for actions-cool/pr-check-fill to create or update PR comments - runs-on: ubuntu-latest - steps: - - name: check fill - uses: actions-cool/pr-check-fill@v1 - with: - filter-start: '|' - require-include: '🇺🇸 English, 🇨🇳 Chinese, 🇺🇸 英文, 🇨🇳 中文' - comment-body: | - - 🚨 Please fill changelog in the PR - - Write with a **developer-oriented perspective** and **narrative method**, without describing the details of the repair - - **Describing the problem and the impact on the developer** - - **describing the user-first site problem**, not your solution - - Refer: https://ant.design/changelog#4.9.0 - - - 🚨 请填写 PR 中的 changelog - - 请用**面向开发者的角度**和**叙述方式撰写**,不描述修复细节 - - **描述问题和对开发者的影响** - - **描述用户第一现场的问题**,而非你的解决方式 - - 参考:https://ant.design/changelog-cn#4.9.0 - skip-title-start: 'docs, chore, test, ci' diff --git a/.github/workflows/preview-build.yml b/.github/workflows/preview-build.yml deleted file mode 100644 index 0af77d36c4ec..000000000000 --- a/.github/workflows/preview-build.yml +++ /dev/null @@ -1,95 +0,0 @@ -# Each PR will build preview site that help to check code is work as expect. - -name: Preview Build - -on: - pull_request: - types: [opened, synchronize, reopened] - -# Cancel prev CI if new commit come -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - # Prepare node modules. Reuse cache if available - setup: - name: prepare preview - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: cache package-lock.json - uses: actions/cache@v3 - with: - path: package-temp-dir - key: lock-${{ github.sha }} - - - name: create package-lock.json - run: npm i --package-lock-only --ignore-scripts - - - name: hack for single file - run: | - if [ ! -d "package-temp-dir" ]; then - mkdir package-temp-dir - fi - cp package-lock.json package-temp-dir - - name: cache node_modules - id: node_modules_cache_id - uses: actions/cache@v3 - with: - path: node_modules - key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - - name: install - if: steps.node_modules_cache_id.outputs.cache-hit != 'true' - run: npm ci - - build-site: - name: build preview - runs-on: ubuntu-latest - needs: setup - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: restore cache from package-lock.json - uses: actions/cache@v3 - with: - path: package-temp-dir - key: lock-${{ github.sha }} - - - name: restore cache from node_modules - uses: actions/cache@v3 - with: - path: node_modules - key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - - name: npm run site - id: site - run: npm run site - env: - SITE_ENV: development - - - name: upload site artifact - uses: actions/upload-artifact@v3 - with: - name: site - path: _site/ - retention-days: 5 - - # Upload PR id for next workflow use - - name: Save PR number - if: ${{ always() }} - run: echo ${{ github.event.number }} > ./pr-id.txt - - - name: Upload PR number - if: ${{ always() }} - uses: actions/upload-artifact@v3 - with: - name: pr - path: ./pr-id.txt diff --git a/.github/workflows/preview-deploy.yml b/.github/workflows/preview-deploy.yml deleted file mode 100644 index 5726bb1accfd..000000000000 --- a/.github/workflows/preview-deploy.yml +++ /dev/null @@ -1,106 +0,0 @@ -# Each PR will build preview site that help to check code is work as expect. - -name: Preview Deploy - -on: - workflow_run: - workflows: ["Preview Build"] - types: - - completed - -permissions: - contents: read - -jobs: - deploy-site: - permissions: - actions: read # for dawidd6/action-download-artifact to query and download artifacts - issues: write # for actions-cool/maintain-one-comment to modify or create issue comments - pull-requests: write # for actions-cool/maintain-one-comment to modify or create PR comments - name: deploy preview - runs-on: ubuntu-latest - if: > - github.event.workflow_run.event == 'pull_request' && - github.event.workflow_run.conclusion == 'success' - steps: - # We need get PR id first - - name: download pr artifact - uses: dawidd6/action-download-artifact@v2 - with: - workflow: ${{ github.event.workflow_run.workflow_id }} - run_id: ${{ github.event.workflow_run.id }} - name: pr - - # Save PR id to output - - name: save PR id - id: pr - run: echo "::set-output name=id::$(](https://preview-${{ steps.pr.outputs.id }}-ant-design.surge.sh) - - body-include: '' - number: ${{ steps.pr.outputs.id }} - - - name: The job has failed - if: ${{ failure() }} - uses: actions-cool/maintain-one-comment@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - body: | - - - body-include: '' - number: ${{ steps.pr.outputs.id }} - - build-site-failed: - permissions: - actions: read # for dawidd6/action-download-artifact to query and download artifacts - issues: write # for actions-cool/maintain-one-comment to modify or create issue comments - pull-requests: write # for actions-cool/maintain-one-comment to modify or create PR comments - name: build preview failed - runs-on: ubuntu-latest - if: > - github.event.workflow_run.event == 'pull_request' && - github.event.workflow_run.conclusion == 'failure' - steps: - # We need get PR id first - - name: download pr artifact - uses: dawidd6/action-download-artifact@v2 - with: - workflow: ${{ github.event.workflow_run.workflow_id }} - run_id: ${{ github.event.workflow_run.id }} - name: pr - - # Save PR id to output - - name: save PR id - id: pr - run: echo "::set-output name=id::$( - - body-include: '' - number: ${{ steps.pr.outputs.id }} diff --git a/.github/workflows/preview-start.yml b/.github/workflows/preview-start.yml deleted file mode 100644 index 692b09c5eddb..000000000000 --- a/.github/workflows/preview-start.yml +++ /dev/null @@ -1,31 +0,0 @@ -# When `preview-build` start. Leave a message on the PR -# -# 🚨🚨🚨 Important 🚨🚨🚨 -# Never do any `checkout` or `npm install` action! -# `pull_request_target` will enable PR to access the secrets! - -name: Preview Start - -on: - pull_request_target: - types: [opened, synchronize, reopened] - -permissions: - contents: read - -jobs: - preview-start: - permissions: - issues: write # for actions-cool/maintain-one-comment to modify or create issue comments - pull-requests: write # for actions-cool/maintain-one-comment to modify or create PR comments - name: start preview info - runs-on: ubuntu-latest - steps: - - name: update status comment - uses: actions-cool/maintain-one-comment@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - body: | - ![Prepare preview](https://user-images.githubusercontent.com/5378891/72351368-2c979e00-371b-11ea-9652-eb4e825d745e.gif) - - body-include: '' diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml deleted file mode 100644 index 6a9d8336a9a0..000000000000 --- a/.github/workflows/rebase.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Automatic Rebase - -on: - issue_comment: - types: [created] - -permissions: - contents: read - -jobs: - rebase: - permissions: - contents: write # for cirrus-actions/rebase to push code to rebase - pull-requests: read # for cirrus-actions/rebase to get info about PR - name: Rebase - if: github.event.issue.pull_request != '' && (contains(github.event.comment.body, '/rebase') || contains(github.event.comment.body, '\rebase')) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Automatic Rebase - uses: cirrus-actions/rebase@1.7 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-helper.yml b/.github/workflows/release-helper.yml deleted file mode 100644 index 9995712fb98f..000000000000 --- a/.github/workflows/release-helper.yml +++ /dev/null @@ -1,64 +0,0 @@ -# Current release process: -# 1. `npm run pub` will call antd-tools `run pub` -# 2. antd-tools `run pub` will generate a new tag -# 3. antd-tools `run pub` will trigger `npm publish` at the same time -# 4. Then the new tag will trigger this current action -# 5. The action will generate a new release, and publish DingDing notification at the same time - -name: Release Helper - -on: - create - -permissions: - contents: read - -jobs: - release-helper: - permissions: - contents: write # for actions-cool/release-helper to create releases - if: github.event.ref_type == 'tag' - runs-on: ubuntu-latest - steps: - - name: release antd - uses: actions-cool/release-helper@v2 - with: - triger: 'tag' - changelogs: 'CHANGELOG.en-US.md, CHANGELOG.zh-CN.md' - branch: 'master' - dingding-token: ${{ secrets.DINGDING_BOT_TOKEN }} - dingding-msg: 'CHANGELOG.zh-CN.md' - msg-title: '# Ant Design {{v}} 发布日志' - msg-poster: 'https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*zx7LTI_ECSAAAAAAAAAAAABkARQnAQ' - msg-footer: '💬 前往 [**Ant Design Releases**]({{url}}) 查看更新日志' - prettier: true - prerelease-filter: '-, a, b, A, B' - - - name: notice next - uses: actions-cool/release-helper@v2 - with: - triger: 'tag' - dingding-token: ${{ secrets.DINGDING_BOT_V5_PRE_TOKEN }} - msg-title: '# Ant Design {{v}} 发布日志' - msg-poster: 'https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*zx7LTI_ECSAAAAAAAAAAAABkARQnAQ' - msg-footer: '💬 前往 [**Ant Design Releases**]({{url}}) 查看更新日志' - prerelease-filter: '-, a, b, A, B' - prerelease-notice: true - - - name: notice bigfish - uses: actions-cool/release-helper@v2 - with: - triger: 'tag' - changelogs: 'CHANGELOG.en-US.md, CHANGELOG.zh-CN.md' - branch: 'master' - dingding-token: ${{ secrets.DINGDING_BOT_BIGFISH_TOKEN }} ${{ secrets.DINGDING_BOT_YUNFENGDIE_TOKEN }} - dingding-msg: 'CHANGELOG.zh-CN.md' - dingding-delay-minute: 10 - release: false - antd-conch-msg: '🐟 当前 Bigfish 内嵌 antd 版本:' - msg-title: '# Ant Design {{v}} 发布日志' - msg-poster: 'https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*zx7LTI_ECSAAAAAAAAAAAABkARQnAQ' - msg-footer: '💬 前往 [**Ant Design Releases**]({{url}}) 查看更新日志' - prettier: true - prerelease-filter: '-, a, b, A, B' - diff --git a/.github/workflows/site-deploy.yml b/.github/workflows/site-deploy.yml deleted file mode 100644 index f358c151719a..000000000000 --- a/.github/workflows/site-deploy.yml +++ /dev/null @@ -1,70 +0,0 @@ -# When publish a release. This workflow will trigger and deploy to site. - -name: Deploy website -on: - create - -permissions: - contents: read - -jobs: - setup: - runs-on: ubuntu-latest - if: github.event.ref_type == 'tag' && (contains(github.event.ref, '-') == false) - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: cache package-lock.json - uses: actions/cache@v3 - with: - path: package-temp-dir - key: lock-${{ github.sha }} - - - name: create package-lock.json - run: npm i --package-lock-only --ignore-scripts - - - name: hack for single file - run: | - if [ ! -d "package-temp-dir" ]; then - mkdir package-temp-dir - fi - cp package-lock.json package-temp-dir - - name: cache node_modules - id: node_modules_cache_id - uses: actions/cache@v3 - with: - path: node_modules - key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - - name: install - if: steps.node_modules_cache_id.outputs.cache-hit != 'true' - run: npm ci - - build-and-deploy: - runs-on: ubuntu-latest - needs: setup - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: restore cache from package-lock.json - uses: actions/cache@v3 - with: - path: package-temp-dir - key: lock-${{ github.sha }} - - - name: restore cache from node_modules - uses: actions/cache@v3 - with: - path: node_modules - key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - - name: build - run: npm run predeploy - - - name: deploy - uses: peaceiris/actions-gh-pages@v3 - with: - deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} - publish_dir: ./_site diff --git a/.github/workflows/size-limit.yml b/.github/workflows/size-limit.yml deleted file mode 100644 index ed8009427cb0..000000000000 --- a/.github/workflows/size-limit.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: 📦 Compressed Size(size-limit) - -on: - pull_request: - types: [opened, synchronize] - -# Cancel prev CI if new commit come -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - compressed-size: - permissions: - contents: read # for actions/checkout to fetch code - pull-requests: write # for preactjs/compressed-size-action to create PR comments - runs-on: ubuntu-latest - env: - CI_JOB_NUMBER: 1 - - steps: - - uses: actions/checkout@v3 - - uses: andresz1/size-limit-action@v1 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - pattern: "./dist/**/*.min.{js,css}" - build-script: "dist:esbuild-no-dup-check" - clean-script: "clean-lockfiles" diff --git a/.github/workflows/sync-gitee.yml b/.github/workflows/sync-gitee.yml deleted file mode 100644 index b9685e8dee76..000000000000 --- a/.github/workflows/sync-gitee.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: 🔀 Sync mirror to Gitee - -on: - push: - branches: - - master - - gh-pages - - feature - - 2.x-stable - - 3.x-stable - create: - -permissions: - contents: read - -jobs: - mirror: - permissions: - contents: none - runs-on: ubuntu-latest - if: github.repository == 'ant-design/ant-design' - steps: - - name: mirror - continue-on-error: true - if: github.event_name == 'push' || (github.event_name == 'create' && github.event.ref_type == 'tag') - uses: wearerequired/git-mirror-action@v1 - env: - SSH_PRIVATE_KEY: ${{ secrets.GITEE_SSH_PRIVATE_KEY }} - with: - source-repo: 'git@github.com:ant-design/ant-design.git' - destination-repo: 'git@gitee.com:ant-design/ant-design.git' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 1d8f938cd861..000000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,438 +0,0 @@ -# Origin Source -# https://github.com/ant-design/ant-design/blob/79f566b7f8abb1012ef55b0d2793bfdf5595b85d/.github/workflows/test.yml -name: ✅ test - -on: [push, pull_request] - -# Cancel prev CI if new commit come -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - setup: - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: cache package-lock.json - uses: actions/cache@v3 - with: - path: package-temp-dir - key: lock-${{ github.sha }} - - - name: create package-lock.json - run: npm i --package-lock-only --ignore-scripts - - - name: hack for single file - run: | - if [ ! -d "package-temp-dir" ]; then - mkdir package-temp-dir - fi - cp package-lock.json package-temp-dir - - name: cache node_modules - id: node_modules_cache_id - uses: actions/cache@v3 - with: - path: node_modules - key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - - name: install - if: steps.node_modules_cache_id.outputs.cache-hit != 'true' - run: npm ci - - lint: - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: restore cache from package-lock.json - uses: actions/cache@v3 - with: - path: package-temp-dir - key: lock-${{ github.sha }} - - - name: restore cache from node_modules - uses: actions/cache@v3 - with: - path: node_modules - key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - - name: lint - run: npm run lint - needs: setup - - tsx-demo: - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: restore cache from package-lock.json - uses: actions/cache@v3 - with: - path: package-temp-dir - key: lock-${{ github.sha }} - - - name: restore cache from node_modules - uses: actions/cache@v3 - with: - path: node_modules - key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - - name: tsx-demo - run: npm run check-ts-demo - needs: setup - - check_metadata: - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: restore cache from package-lock.json - uses: actions/cache@v3 - with: - path: package-temp-dir - key: lock-${{ github.sha }} - - - name: restore cache from node_modules - uses: actions/cache@v3 - with: - path: node_modules - key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - - name: check demo - run: node ./scripts/check-demo.js - needs: setup - - ################################ Dist ################################ - dist: - name: dist - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: restore cache from package-lock.json - uses: actions/cache@v3 - with: - path: package-temp-dir - key: lock-${{ github.sha }} - - - name: restore cache from node_modules - uses: actions/cache@v3 - with: - path: node_modules - key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - - name: cache dist - uses: actions/cache@v3 - with: - path: dist - key: dist-${{ github.sha }} - - - name: dist - run: CI=1 npm run dist - env: - NODE_OPTIONS: --max_old_space_size=4096 - needs: setup - - ############################### Style ################################ - style-compile: - name: es style compile - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: restore cache from package-lock.json - uses: actions/cache@v3 - with: - path: package-temp-dir - key: lock-${{ github.sha }} - - - name: restore cache from node_modules - uses: actions/cache@v3 - with: - path: node_modules - key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - - name: restore cache from lib - uses: actions/cache@v3 - with: - path: lib - key: lib-${{ github.sha }} - - - name: restore cache from es - uses: actions/cache@v3 - with: - path: es - key: es-${{ github.sha }} - - - name: lessc component - run: npx lessc --js ./es/button/style/index.less - - - name: lessc mixins - run: npx lessc --js ./es/style/mixins/index.less - needs: compile - - style-dist: - name: dist style compile - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: restore cache from package-lock.json - uses: actions/cache@v3 - with: - path: package-temp-dir - key: lock-${{ github.sha }} - - - name: restore cache from node_modules - uses: actions/cache@v3 - with: - path: node_modules - key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - - name: restore cache from lib - uses: actions/cache@v3 - with: - path: lib - key: lib-${{ github.sha }} - - - name: restore cache from es - uses: actions/cache@v3 - with: - path: es - key: es-${{ github.sha }} - - - name: restore cache from dist - uses: actions/cache@v3 - with: - path: dist - key: dist-${{ github.sha }} - - - name: lessc default - run: npx lessc --js ./dist/antd.less - - - name: lessc dark - run: npx lessc --js ./dist/antd.dark.less - - - name: lessc variable - run: npx lessc --js ./dist/antd.variable.less - needs: [compile, dist] - - ################################ Test ################################ - normal-test: - name: test - strategy: - matrix: - react: ['16', '17', '18'] - module: ['dom', 'node', 'dist'] - shard: ['1/2', '2/2'] - env: - REACT: ${{ matrix.react }} - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: restore cache from package-lock.json - uses: actions/cache@v3 - with: - path: package-temp-dir - key: lock-${{ github.sha }} - - - name: restore cache from node_modules - uses: actions/cache@v3 - with: - path: node_modules - key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - - name: install react 16 - if: ${{ matrix.react == '16' }} - run: npm run install-react-16 - - - name: install react 17 - if: ${{ matrix.react == '17' }} - run: npm run install-react-17 - - - name: install react 18 - if: ${{ matrix.react == '18' }} - run: npm run install-react-18 - - - name: restore cache from dist - if: ${{ matrix.module == 'dist' }} - uses: actions/cache@v3 - with: - path: dist - key: dist-${{ github.sha }} - - - name: check - if: ${{ matrix.module == 'dist' }} - run: node ./tests/dekko/dist.test.js - - # 17 only - - name: bundlesize - if: ${{ matrix.module == 'dist' && matrix.react == '17' }} - run: npm run bundlesize - env: - BUNDLESIZE_GITHUB_TOKEN: ${{ secrets.BUNDLESIZE_GITHUB_TOKEN }} - - # dom test - - name: dom test - if: ${{ matrix.module == 'dom' }} - run: npm test -- --maxWorkers=2 --shard=${{matrix.shard}} --coverage - - - name: persist coverages - if: ${{ matrix.module == 'dom' && matrix.react == '17' }} - run: | - mkdir persist-coverage - mv coverage/coverage-final.json persist-coverage/react-${{matrix.react}}-test-${{matrix.module}}-${{strategy.job-index}}.json - - - uses: actions/upload-artifact@v3 - if: ${{ matrix.module == 'dom' && matrix.react == '17' }} - name: upload coverages - with: - name: coverage-artifacts - path: persist-coverage/ - - # node test - - name: node test - if: ${{ matrix.module == 'node' }} - run: npm run test-node - - # dist test - - name: dist test - if: ${{ matrix.module == 'dist' }} - run: npm test - env: - LIB_DIR: dist - needs: [setup, dist] - - ############################ Test Coverage ########################### - upload-test-coverage: - name: test-coverage - runs-on: ubuntu-latest - needs: [normal-test] - steps: - - uses: actions/checkout@v3 - - uses: actions/download-artifact@v3 - with: - name: coverage-artifacts - path: persist-coverage - - name: Merge Code Coverage - run: | - npx nyc merge persist-coverage/ coverage/coverage-final.json - npx nyc report --reporter text -t coverage --report-dir coverage - rm -rf persist-coverage - - name: Upload coverage to codecov - uses: codecov/codecov-action@v3 - with: - # use own token to upload coverage reports - token: ${{ secrets.CODECOV_TOKEN }} - - ########################### Compile & Test ########################### - compile: - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: restore cache from package-lock.json - uses: actions/cache@v3 - with: - path: package-temp-dir - key: lock-${{ github.sha }} - - - name: restore cache from node_modules - uses: actions/cache@v3 - with: - path: node_modules - key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - - name: cache lib - uses: actions/cache@v3 - with: - path: lib - key: lib-${{ github.sha }} - - - name: cache es - uses: actions/cache@v3 - with: - path: es - key: es-${{ github.sha }} - - - name: compile - run: npm run compile - - - name: check - run: node ./tests/dekko/lib.test.js - needs: setup - - compiled-module-test: - name: module test - runs-on: ubuntu-latest - strategy: - matrix: - react: ['16', '17', '18'] - module: [lib, es] - shard: ['1/2', '2/2'] - env: - REACT: ${{ matrix.react }} - steps: - - name: checkout - # lib only run in master branch not in pull request - if: ${{ github.event_name != 'pull_request' || matrix.module != 'lib' }} - uses: actions/checkout@v3 - - - name: restore cache from package-lock.json - # lib only run in master branch not in pull request - if: ${{ github.event_name != 'pull_request' || matrix.module != 'lib' }} - uses: actions/cache@v3 - with: - path: package-temp-dir - key: lock-${{ github.sha }} - - - name: restore cache from node_modules - # lib only run in master branch not in pull request - if: ${{ github.event_name != 'pull_request' || matrix.module != 'lib' }} - uses: actions/cache@v3 - with: - path: node_modules - key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - - name: restore cache from ${{ matrix.module }} - # lib only run in master branch not in pull request - if: ${{ github.event_name != 'pull_request' || matrix.module != 'lib' }} - uses: actions/cache@v3 - with: - path: ${{ matrix.module }} - key: ${{ matrix.module }}-${{ github.sha }} - - - name: install react 16 - if: ${{ matrix.react == '16' && (github.event_name != 'pull_request' || matrix.module != 'lib') }} - run: npm run install-react-16 - - - name: install react 17 - if: ${{ matrix.react == '17' && (github.event_name != 'pull_request' || matrix.module != 'lib') }} - run: npm run install-react-17 - - - name: install react 18 - if: ${{ matrix.react == '18' && (github.event_name != 'pull_request' || matrix.module != 'lib') }} - run: npm run install-react-18 - - - name: test - # lib only run in master branch not in pull request - if: ${{ github.event_name != 'pull_request' || matrix.module != 'lib' }} - run: npm test -- --maxWorkers=2 --shard=${{matrix.shard}} - env: - LIB_DIR: ${{ matrix.module }} - needs: compile diff --git a/.github/workflows/verify-files-modify.yml b/.github/workflows/verify-files-modify.yml deleted file mode 100644 index 7a661cacf68f..000000000000 --- a/.github/workflows/verify-files-modify.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Verify Files modify - -on: - pull_request_target: - types: [opened, synchronize] - -permissions: - contents: read - -jobs: - verify: - permissions: - pull-requests: write # for actions-cool/verify-files-modify to update status of PRs - runs-on: ubuntu-latest - steps: - - name: verify-version - uses: actions-cool/verify-files-modify@v1 - with: - forbid-paths: '.github/, scripts/' - forbid-files: 'CHANGELOG.zh-CN.md, CHANGELOG.en-US.md, LICENSE' - skip-verify-authority: 'write' - skip-label: 'skip-verify-files' - assignees: 'afc163, zombieJ, xrkffgg, MadCcc' - comment-mark: 'version' - comment: | - Hi @${{ github.event.pull_request.user.login }}. Thanks for your contribution. The path `.github/` or `scripts/` and `CHANGELOG` is only maintained by team members. This current PR will be closed and team members will help on this. - close: true - set-failed: false - - - name: verify-less - uses: actions-cool/verify-files-modify@v1 - with: - forbid-files: 'components/style/themes/default.less' - skip-verify-authority: 'admin' - comment-mark: 'less' - comment: | - 🚨 Hi @${{ github.event.pull_request.user.login }}. Thanks for your contribution, as the `default.less` file is currently being upgraded, changes are not recommended. - - 🚨 你好,@${{ github.event.pull_request.user.login }}。感谢你的贡献,由于 `default.less` 文件近期处于升级状态,不建议进行更改。 - close: false - set-failed: false diff --git a/.github/workflows/verify-package-version.yml b/.github/workflows/verify-package-version.yml deleted file mode 100644 index 6ff6065a3581..000000000000 --- a/.github/workflows/verify-package-version.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Verify Package Version - -on: - pull_request: - types: [opened, edited, reopened, synchronize, ready_for_review] - -permissions: - contents: read - -jobs: - verify: - permissions: - contents: read # for actions/checkout to fetch code - pull-requests: write # for actions-cool/verify-package-version to comment on PR - runs-on: ubuntu-latest - if: contains(github.event.pull_request.title, 'changelog') || contains(github.event.pull_request.title, 'release') - steps: - - uses: actions/checkout@v3 - - name: verify-version - uses: actions-cool/verify-package-version@v1 - with: - title-include-content: 'docs' - title-include-version: true - open-comment: true diff --git a/.gitignore b/.gitignore index 56055aa70afb..8b613a82a104 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,4 @@ __image_snapshots__/ /imageDiffSnapshots .devcontainer* +.github