diff --git a/.gihub/ISSUE_TEMPLATE/BUGS.yml b/.gihub/ISSUE_TEMPLATE/BUGS.yml new file mode 100644 index 0000000..bd348d7 --- /dev/null +++ b/.gihub/ISSUE_TEMPLATE/BUGS.yml @@ -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 diff --git a/.gihub/ISSUE_TEMPLATE/BUILD.yml b/.gihub/ISSUE_TEMPLATE/BUILD.yml new file mode 100644 index 0000000..492a16b --- /dev/null +++ b/.gihub/ISSUE_TEMPLATE/BUILD.yml @@ -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 diff --git a/.gihub/ISSUE_TEMPLATE/FEATURE.yml b/.gihub/ISSUE_TEMPLATE/FEATURE.yml new file mode 100644 index 0000000..1661b88 --- /dev/null +++ b/.gihub/ISSUE_TEMPLATE/FEATURE.yml @@ -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 diff --git a/.gihub/ISSUE_TEMPLATE/LEARN.yml b/.gihub/ISSUE_TEMPLATE/LEARN.yml new file mode 100644 index 0000000..0b7ad33 --- /dev/null +++ b/.gihub/ISSUE_TEMPLATE/LEARN.yml @@ -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 diff --git a/.gihub/PULL_REQUEST_TEMPLATE.md b/.gihub/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..cb624f6 --- /dev/null +++ b/.gihub/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,10 @@ + + +#### 描述 (必填) + + + +#### 相关 issues (可选) + +- Closes # +- Related to # diff --git a/.gihub/workflows/PULL_REQUEST_TEMPLATE.md b/.gihub/workflows/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..cb624f6 --- /dev/null +++ b/.gihub/workflows/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,10 @@ + + +#### 描述 (必填) + + + +#### 相关 issues (可选) + +- Closes # +- Related to # diff --git a/.gihub/workflows/lint.yml b/.gihub/workflows/lint.yml new file mode 100644 index 0000000..cc5385f --- /dev/null +++ b/.gihub/workflows/lint.yml @@ -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 diff --git a/.gihub/workflows/release.yml b/.gihub/workflows/release.yml new file mode 100644 index 0000000..2d60c3e --- /dev/null +++ b/.gihub/workflows/release.yml @@ -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}} diff --git a/.gihub/workflows/update-license.yml b/.gihub/workflows/update-license.yml new file mode 100644 index 0000000..e13bba6 --- /dev/null +++ b/.gihub/workflows/update-license.yml @@ -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