Skip to content

Commit

Permalink
chore(projects): add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
lixin59 committed Mar 3, 2023
1 parent c3d0b74 commit f355a69
Show file tree
Hide file tree
Showing 5 changed files with 172 additions and 0 deletions.
83 changes: 83 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Bug提交
description: 在使用软件或功能的过程中遇到了错误
title: '[Bug]: '
labels: [bug?]

body:
- 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: 补充说明(可选)
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Pull Request 详情

请根据实际使用情况修改以下信息。

## 版本信息

## 解决了哪些问题

## 是否关闭了某个 Issue

Closes #
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
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release
on:
push:
tags:
- 'v*.**'

permissions:
contents: write

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

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Create github releases
run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
21 changes: 21 additions & 0 deletions changelogithub.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"types": {
"feat": { "title": "🚀 Features" },
"perf": { "title": "🔥 Performance" },
"fix": { "title": "🩹 Fixes" },
"refactor": { "title": "💅 Refactors" },
"docs": { "title": "📖 Documentation" },
"types": { "title": "🌊 Types" },
"chore": { "title": "🏡 Chore" },
"test": { "title": "🧪 Tests" },
"style": { "title": "🎨 Styles" },
"ci": { "title": "🤖 CI" }
},
"scopeMap": {},
"titles": {
"breakingChanges": "🚨 Breaking Changes"
},
"contributors": true,
"capitalize": true,
"group": true
}

0 comments on commit f355a69

Please sign in to comment.