Skip to content

Commit

Permalink
ci(projects): add github config
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Jun 13, 2024
1 parent 8b6135e commit fe15a9a
Show file tree
Hide file tree
Showing 6 changed files with 336 additions and 0 deletions.
90 changes: 90 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report_cn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Bug提交
description: 在使用软件或功能的过程中遇到了错误
title: '[Bug]: '
labels: [ "bug?" ]

body:
- type: markdown
attributes:
value: |
## 请按照以下要求进行提交
### 1. 提交后需要指定标签和截止时间。
---
- type: markdown
attributes:
value: |
## 环境信息
请根据实际使用环境修改以下信息。
- type: input
id: env-program-ver
attributes:
label: 软件版本
validations:
required: true

- type: dropdown
id: env-vm-ver
attributes:
label: 运行环境
description: 选择运行软件的系统版本
options:
- Windows (64)
- Windows (32/x84)
- MacOS
- Linux
- Ubuntu
- CentOS
- ArchLinux
- UNIX (Android)
- 其它(请在下方说明)
validations:
required: true

- type: dropdown
id: env-vm-arch
attributes:
label: 运行架构
description: (可选) 选择运行软件的系统架构
options:
- AMD64
- x86
- ARM [32] (别名:AArch32 / ARMv7)
- ARM [64] (别名:AArch64 / ARMv8)
- 其它

- type: textarea
id: reproduce-steps
attributes:
label: 重现步骤
description: |
我们需要执行哪些操作才能让 bug 出现?
简洁清晰的重现步骤能够帮助我们更迅速地定位问题所在。
validations:
required: true

- type: textarea
id: expected
attributes:
label: 期望的结果是什么?
validations:
required: true

- type: textarea
id: actual
attributes:
label: 实际的结果是什么?
validations:
required: true

- type: textarea
id: logging
attributes:
label: 日志记录(可选)
render: golang

- type: textarea
id: extra-desc
attributes:
label: 补充说明(可选)
90 changes: 90 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report_en.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Bug Report
description: Encountered an error while using the software or feature
title: '[Bug]: '
labels: [ "bug?" ]

body:
- type: markdown
attributes:
value: |
## Please submit according to the following requirements
### 1. After submission, you need to specify the label and deadline.
---
- type: markdown
attributes:
value: |
## Environment Information
Please modify the following information according to the actual usage environment.
- type: input
id: env-program-ver
attributes:
label: Software Version
validations:
required: true

- type: dropdown
id: env-vm-ver
attributes:
label: Operating Environment
description: Select the system version on which the software is running
options:
- Windows (64)
- Windows (32/x84)
- MacOS
- Linux
- Ubuntu
- CentOS
- ArchLinux
- UNIX (Android)
- Other (please specify below)
validations:
required: true

- type: dropdown
id: env-vm-arch
attributes:
label: Operating Architecture
description: (Optional) Select the system architecture on which the software is running
options:
- AMD64
- x86
- ARM [32] (Alias:AArch32 / ARMv7)
- ARM [64] (Alias:AArch64 / ARMv8)
- Other

- type: textarea
id: reproduce-steps
attributes:
label: Reproduce Steps
description: |
What operations do we need to perform to make the bug appear?
The concise and clear reproduction steps can help us locate the problem more quickly.
validations:
required: true

- type: textarea
id: expected
attributes:
label: What is the expected result?
validations:
required: true

- type: textarea
id: actual
attributes:
label: What is the actual result?
validations:
required: true

- type: textarea
id: logging
attributes:
label: Logging (Optional)
render: golang

- type: textarea
id: extra-desc
attributes:
label: Additional Description (Optional)
50 changes: 50 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pr_cn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
首先,感谢你的贡献! 😄

新特性请提交至 feature 分支,其余可提交至 main 分支。在一个维护者审核通过后合并。请确保填写以下 pull request 的信息,谢谢!~

[[English Template / 英文模板](./pr_en.md)]

### 这个变动的性质是

- [ ] 新特性提交
- [ ] 日常 bug 修复
- [ ] 站点、文档改进
- [ ] 组件样式改进
- [ ] TypeScript 定义更新
- [ ] 重构
- [ ] 代码风格优化
- [ ] 分支合并
- [ ] 其他改动(是关于什么的改动?)

### 需求背景

> 1. 描述相关需求的来源。
> 2. 要解决的问题。
> 3. 相关的 issue 讨论链接。
### 实现方案和 API(非新功能可选)

> 1. 基本的解决思路和其他可选方案。
> 2. 列出最终的 API 实现和用法。
> 3. 涉及 UI/交互变动需要有截图或 GIF。
### 对用户的影响和可能的风险(非新功能可选)

> 1. 这个改动对用户端是否有影响?影响的方面有哪些?
> 2. 是否有可能隐含的 break change 和其他风险?
### Changelog 描述(非新功能可选)

> 1. 英文描述
> 2. 中文描述(可选)
### 请求合并前的自查清单

- [ ] 文档已补充或无须补充
- [ ] 代码演示已提供或无须提供
- [ ] TypeScript 定义已补充或无须补充
- [ ] Changelog 已提供或无须提供

### 后续计划(非新功能可选)

> 如果这个提交后面还有相关的其他提交和跟进信息,可以写在这里。
51 changes: 51 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pr_en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
First of all, thank you for your contribution! 😄

New feature please send pull request to feature branch, and rest to main branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you!

[[中文版模板 / Chinese template](./pr_cn.md)]

### This is a ...

- [ ] New feature
- [ ] Bug fix
- [ ] Site / document update
- [ ] Component style update
- [ ] TypeScript definition update
- [ ] Refactoring
- [ ] Code style optimization
- [ ] Branch merge
- [ ] Other (about what?)

### What's the background?

> 1. Describe the source of requirement.
> 2. Resolve what problem.
> 3. Related issue link.
### API Realization (Optional if not new feature)

> 1. Basic thought of solution and other optional proposal.
> 2. List final API realization and usage sample.
> 3. GIF or snapshot should be provided if includes UI/interactive modification.
### What's the effect? (Optional if not new feature)

> 1. Does this PR affect user? Which part will be affected?
> 2. What will say in changelog?
> 3. Does this PR contains potential break change or other risk?
### Changelog description (Optional if not new feature)

> 1. English description
> 2. Chinese description (optional)
### Self Check before Merge

- [ ] 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

### Additional Plan? (Optional if not new feature)

> If this PR related with other PR or following info. You can type here.
30 changes: 30 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Lint Code

permissions:
contents: write

on:
pull_request:
branches: [main]

jobs:
lint:
name: Lint All Code
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Lint Code Base
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
# To change branch master or main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FILTER_REGEX_EXCLUDE: (docs|.github)
VALIDATE_MARKDOWN: false
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release

permissions:
contents: write

on:
push:
tags:
- "v*"

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
node-version: 18.x

- run: npx githublogen
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit fe15a9a

Please sign in to comment.