Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: ⚙️ 添加ci #5

Merged
merged 1 commit into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .gihub/ISSUE_TEMPLATE/BUGS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "报告 Bug 🐛"
description: 发现了一个问题?请告诉我们!
labels: [
"bug"
]
body:
- type: textarea
id: description
attributes:
label: "📝 问题描述"
description: 描述你的问题
placeholder: 描述你的问题...
validations:
required: true
- type: textarea
id: expected
attributes:
label: "🤔 期望行为"
description: 请述你期望的行为
placeholder: 我期望的是...
validations:
required: true
- type: textarea
id: current
attributes:
label: "👀 当前行为"
description: 请描述当前的行为
placeholder: 当前的行为是...
validations:
required: true
- type: input
id: browser
attributes:
label: 🖥️ Browser
description: 你使用的浏览器和版本
placeholder: Chrome X
validations:
required: true
- type: textarea
id: additional
attributes:
label: "📄 更多信息"
description: 更多的信息或截图
validations:
required: false
21 changes: 21 additions & 0 deletions .gihub/ISSUE_TEMPLATE/BUILD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "基础建设"
description: 需要的基础建设
labels: [
"build"
]
body:
- type: textarea
id: description
attributes:
label: "📝 基建描述"
description: 描述需要的基础建设
placeholder: 描述需要的基础建设...
validations:
required: true
- type: textarea
id: links
attributes:
label: "📄 相关链接"
description: 基建技术相关的文档链接等
validations:
required: false
21 changes: 21 additions & 0 deletions .gihub/ISSUE_TEMPLATE/FEATURE.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "新增功能"
description: 新增功能
labels: [
"feature request"
]
body:
- type: textarea
id: description
attributes:
label: "📝 想要新增的功能"
description: 新增功能描述
placeholder: 新增功能描述...
validations:
required: true
- type: textarea
id: links
attributes:
label: "📄 相关技术"
description: 需要的技术相关的文档链接等
validations:
required: false
21 changes: 21 additions & 0 deletions .gihub/ISSUE_TEMPLATE/LEARN.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "知识储备学习"
description: 知识储备学习
labels: [
"learn"
]
body:
- type: textarea
id: description
attributes:
label: "📝 知识储备"
description: 描述需要的技术知识
placeholder: 描述需要的技术知识...
validations:
required: true
- type: textarea
id: links
attributes:
label: "📄 相关链接"
description: 技术相关的文档链接等
validations:
required: false
10 changes: 10 additions & 0 deletions .gihub/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- 请认真填写 PR 描述 -->

#### 描述 (必填)

<!-- 请描述您提议的更改,以及原因 -->

#### 相关 issues (可选)

- Closes #<!-- 如果此 PR 将关闭该 issue,请添加 issue 编号。 -->
- Related to #<!-- 如果此 PR 与其他 issue 相关,请添加 issue 编号。 -->
10 changes: 10 additions & 0 deletions .gihub/workflows/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- 请认真填写 PR 描述 -->

#### 描述 (必填)

<!-- 请描述您提议的更改,以及原因 -->

#### 相关 issues (可选)

- Closes #<!-- 如果此 PR 将关闭该 issue,请添加 issue 编号。 -->
- Related to #<!-- 如果此 PR 与其他 issue 相关,请添加 issue 编号。 -->
36 changes: 36 additions & 0 deletions .gihub/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: lint

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Install PNPM
uses: pnpm/action-setup@v2
with:
version: ^8.0

- name: Install Deps
run: pnpm i --no-frozen-lockfile

- name: Format
run: pnpm run format:ci

- name: Lint
run: pnpm run lint

- name: Build
run: pnpm run build
22 changes: 22 additions & 0 deletions .gihub/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release

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: 16.x

- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
11 changes: 11 additions & 0 deletions .gihub/workflows/update-license.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Update License

on:
workflow_dispatch:
schedule:
# Update the license once a year on January 1
- cron: "0 0 1 1 *"

jobs:
update-license:
uses: sozonome/workflows/.github/workflows/update-license.yml@main