diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..d7c0a67 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly + day: monday + time: "21:00" + timezone: Asia/Shanghai + groups: + github-actions: + patterns: + - "*" diff --git a/FUNDING.yml b/FUNDING.yml new file mode 100644 index 0000000..758659a --- /dev/null +++ b/FUNDING.yml @@ -0,0 +1,2 @@ +github: ant-design +open_collective: ant-design diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..bd0a1f7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019-present react-component + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 25c1f00..15336df 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,34 @@ -# GitHub Actions +
+

React Component GitHub Defaults

+

Ant Design Part of the Ant Design ecosystem.

+

🧰 Shared GitHub community files and workflow templates for rc-component packages.

+
-🤖 React Component GitHub Actions CI workflow template. +

English | 简体中文

-ref: [GitHub docs](https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/sharing-workflows-with-your-organization) +Shared GitHub community files and workflow templates for the React Component organization. -## 💬 How to use? +## Recommended CI -1、On GitHub, navigate to the main page of the repository. +New rc-component repositories should use the reusable workflow from `react-component/rc-test`: -2、Under your repository name, click Actions. +```yml +jobs: + test: + uses: react-component/rc-test/.github/workflows/test-utoo.yml@main + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} +``` -![](./assets/image/actions-tab.png) +## Workflow Template -3、If your repository already has existing workflows: In the upper-left corner, click New workflow. +1. Open the target repository on GitHub. +2. Go to the Actions tab. +3. Click New workflow when the repository already has workflows. +4. Choose the React Component workflow template. -![](./assets/image/actions-new-workflow.png) +See GitHub's documentation for [sharing workflows with an organization](https://docs.github.com/en/actions/using-workflows/sharing-workflows-secrets-and-runners-with-your-organization). -4、In section titled "Workflows created by React Component". Click **Set up this workflow**. +## License -![](./assets/image/react-component-ci.png) - -## 💬 How to migrate from travis CI? - -1、Remove `.travis.yml` from the root dir of project. - -2、Update build ci badge url in `README.md`. - -ref: [Update Badge](https://github.com/react-component/trigger/pull/213) - -3、Following [How to use](#how-to-use) to set up github actions. +MIT License. See [LICENSE](./LICENSE) for details. diff --git a/README.zh-CN.md b/README.zh-CN.md new file mode 100644 index 0000000..a3cc860 --- /dev/null +++ b/README.zh-CN.md @@ -0,0 +1,29 @@ +
+

React Component GitHub Defaults

+

Ant Design Ant Design 生态的一部分。

+

🧰 rc-component 仓库共享的 GitHub 社区文件与工作流模板。

+
+ +

English | 简体中文

+ +React Component 组织共享的 GitHub Actions 工作流模板。 + +## 使用方式 + +1. 进入目标仓库的 Actions 页面。 +2. 如果仓库已有工作流,点击 New workflow。 +3. 选择 React Component 提供的模板并按需提交。 + +当前推荐新仓库直接使用 [rc-test](https://github.com/react-component/rc-test) 中的 reusable workflow: + +```yml +jobs: + test: + uses: react-component/rc-test/.github/workflows/test-utoo.yml@main + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} +``` + +## License + +MIT License。详见 [LICENSE](./LICENSE)。 diff --git a/profile/README.md b/profile/README.md index 300de90..834d64c 100644 --- a/profile/README.md +++ b/profile/README.md @@ -1,29 +1,24 @@ -# Fundamental react components of antd +# React Component -React components foundation of https://ant.design, developed and maintained by the Ant Design Team. +React Component provides the low-level React primitives that power the Ant Design ecosystem. -## Docs - -https://react-component.github.io +

+ Ant Design + Part of the Ant Design ecosystem. +

-### 中文 +## Packages -- [如何开发一个 react 组件](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/how-to-write-a-react-component.md) -- [react 组件代码规范](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-code-style.md) -- [react 组件设计原则](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-design.md) -- [kissy 与 react 组件编写异同](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/kissy-react-compare.md) +- Core component packages live under [react-component](https://github.com/react-component). +- Public packages are published as @rc-component/* when possible. +- Shared test workflow lives in [rc-test](https://github.com/react-component/rc-test). +- Shared release helper lives in [@rc-component/np](https://github.com/react-component/np). -## third-party recommended react components +## Docs -- [search index](http://react-components.com) -- [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap/) -- [react-forms](https://github.com/prometheusresearch/react-forms) -- [react-router](https://github.com/rackt/react-router) -- [flux-router-component](https://github.com/yahoo/flux-router-component) +- [Ant Design](https://ant.design) +- [React Component docs](https://react-component.github.io) -## tutorials +## License -- [learning-react](https://github.com/yiminghe/learning-react) -- [awesome-react](https://github.com/enaqx/awesome-react) -- [react-learning](https://github.com/rpflorence/react-training) -- [react-starter-kit](https://github.com/kriasoft/react-starter-kit) +MIT License. See [LICENSE](../LICENSE) for details. diff --git a/workflow-templates/react-component-ci.yml b/workflow-templates/react-component-ci.yml index 12a3a75..99bd42f 100644 --- a/workflow-templates/react-component-ci.yml +++ b/workflow-templates/react-component-ci.yml @@ -1,114 +1,16 @@ -name: CI +name: ✅ test on: push: - branches: [ $default-branch ] + branches: [$default-branch] pull_request: - branches: [ $default-branch ] + branches: [$default-branch] -jobs: - setup: - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@master - - - uses: actions/setup-node@v1 - with: - node-version: '12' - - - name: cache package-lock.json - uses: actions/cache@v2 - with: - path: package-temp-dir - key: lock-${{ github.sha }} - - - name: create package-lock.json - run: npm i --package-lock-only - - - name: hack for singe 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@v2 - 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@master - - - name: restore cache from package-lock.json - uses: actions/cache@v2 - with: - path: package-temp-dir - key: lock-${{ github.sha }} - - - name: restore cache from node_modules - uses: actions/cache@v2 - with: - path: node_modules - key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - - name: lint - run: npm run lint +permissions: + contents: read - needs: setup - - compile: - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@master - - - name: restore cache from package-lock.json - uses: actions/cache@v2 - with: - path: package-temp-dir - key: lock-${{ github.sha }} - - - name: restore cache from node_modules - uses: actions/cache@v2 - with: - path: node_modules - key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - - name: compile - run: npm run compile - - needs: setup - - coverage: - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@master - - - name: restore cache from package-lock.json - uses: actions/cache@v2 - with: - path: package-temp-dir - key: lock-${{ github.sha }} - - - name: restore cache from node_modules - uses: actions/cache@v2 - with: - path: node_modules - key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - - - name: coverage - run: npm test -- --coverage && bash <(curl -s https://codecov.io/bash) - - needs: setup \ No newline at end of file +jobs: + test: + uses: react-component/rc-test/.github/workflows/test-utoo.yml@main + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}