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

feat: please review diff #3

Open
wants to merge 9 commits into
base: old-master
Choose a base branch
from
Open
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
Binary file added .github/.DS_Store
Binary file not shown.
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: "🐛 Bug Report"
description: Report a bug
title: "[Bug]: Bug title"
labels: [bug]
assignees: []
body:
- type: textarea
id: description
attributes:
label: Describe the bug
description: What is the problem?
placeholder: A clear and concise description of the bug.
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Reproduction Steps
description: Reproducible repository address, fast code, screenshot or screen recording, etc...
validations:
required: true
- type: textarea
id: observed-behavior
attributes:
label: Observed Behavior
description: |
What actually happened?

Please include full errors, uncaught exceptions, stack traces, and relevant logs.
If service responses are relevant, please include wire logs.
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: |
What did you expect to happen?
validations:
required: true
- type: textarea
id: solution
attributes:
label: Possible Solution
description: |
Suggest a fix/reason for the bug
validations:
required: false
- type: textarea
id: context
attributes:
label: Additional Information/Context
description: |
Anything else that might be relevant for troubleshooting this bug. Providing context helps us come up with a solution that is most useful in the real world.
validations:
required: false
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
blank_issues_enabled: false
contact_links:
- name: 💬 General Question
url: [email protected]
about: Please ask and answer questions as a discussion thread
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/discuss.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: "💬 Discuss"
description: Start a discussion
title: "[Discuss]: Discuss title"
labels: [discuss]
assignees: []
body:
- type: textarea
id: description
attributes:
label: Discuss topic
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Screenshots
- type: textarea
id: observed-behavior
attributes:
label: Useful Links
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: "🚀 Feature"
description: Start a feature request
title: "[Feature]: Feature title"
labels: [feature]
assignees: []
body:
- type: textarea
id: Why
attributes:
label: Why you want this Feature?
description: What is the usage scenario?
validations:
required: true
- type: textarea
id: Use
attributes:
label: Describe the solution you'd like
description: How to use it?
- type: textarea
id: additional
attributes:
label: Additional context
25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
### 关联 Issue

<!-- 请用 fixes、closes、resolves、relates 这些关键词来关联 issue,原则上,所有 PR 都应该有关联 Issue -->

### 主要改动

<!--
@example:
1. 修复了 xxx
2. 改进了 xxx
3. 调整了 xxx
-->

### 界面截图

<!-- 如果改动的是跟 UI 相关的,不论是 CLI 还是 WEB 都应该截图 -->

### 测试计划

<!-- 如果本次变更没有自动化测试覆盖,你整理的测试用例集是什么?需要编写成 todo list 放到下面 -->

### 检查清单

- [ ] CHANGELOG.md 是否更新好了
- [ ] 版本升级过了吗?
20 changes: 20 additions & 0 deletions .github/workflows/check-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: check-pr-title

on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize
branches:
- master
- dev

jobs:
lint-title:
runs-on: ubuntu-latest
steps:
- uses: ArcBlock/action-lint-pull-request-title@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/publish-beta-to-npm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: publish-beta-to-npm

on:
push:
branches: [master]

jobs:
publish-beta-to-npm:
runs-on: ubuntu-latest
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
steps:
- name: Checkout release branch code
uses: actions/checkout@v3
with:
fetch-depth: 1

- uses: pnpm/action-setup@v2
with:
version: 8

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
registry-url: "https://registry.npmjs.org"

- name: Install deps
run: pnpm install

- name: Build
run: pnpm build

- name: Publish to NPM
run: |
node scripts/update-beta-package-version.js
cat package.json | grep version
npm publish --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/publish-to-npm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: publish-to-npm

on:
push:
branches: [release]

jobs:
publish-to-npm:
runs-on: ubuntu-latest
steps:
- name: Checkout release branch code
uses: actions/checkout@v3
with:
fetch-depth: 1

- uses: pnpm/action-setup@v2
with:
version: 8

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
registry-url: "https://registry.npmjs.org"

- name: Install deps
run: pnpm install

- name: Build
run: pnpm build

- name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/task-list-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: task-list-checker
on:
pull_request:
types: [opened, edited, synchronize, reopened]
jobs:
task-list-checker:
runs-on: ubuntu-latest
steps:
- name: Check for incomplete task list items
uses: Shopify/task-list-checker@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: unit-test

on:
pull_request:
branches:
- release
- master

jobs:
integration:
runs-on: ubuntu-latest

if: "! contains(toJSON(github.event.commits.*.message), '[skip actions]')"

steps:
- name: Checkout repo
uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
version: 8

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"

- name: Install deps
run: pnpm install

- name: Lint package
run: pnpm run lint

- name: Run unit test
run: pnpm run test
43 changes: 43 additions & 0 deletions .github/workflows/version-check-for-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: version-check-for-npm
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

on:
pull_request:
branches:
- release

jobs:
version-check-for-npm:
timeout-minutes: 30
runs-on: ubuntu-latest
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Extract current version
id: get_version
run: |
PACKAGE_NAME=$(node -p -e "require('./package.json').name")
echo "PACKAGE_NAME=${PACKAGE_NAME}" >> $GITHUB_ENV
CURRENT_VERSION=$(node -p -e "require('./package.json').version")
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV

- name: Publish to NPM
run: |
LATEST_VERSION=$(npm show $PACKAGE_NAME version)
# https://www.npmjs.com/package/compare-versions-cli
npm install -g compare-versions-cli
COMPARE=$(compare-versions-cli $CURRENT_VERSION $LATEST_VERSION)
if [ $COMPARE -le 0 ]
then
echo "CURRENT_VERSION($CURRENT_VERSION) must greater than LATEST_VERSION($LATEST_VERSION)"
echo "npm: https://www.npmjs.com/package/$PACKAGE_NAME"
exit 1
fi
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"cSpell.words": [
"arcblock",
"skypesky",
"Vallet"
]
}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 6.0.1

- feat: default disable @pm2/io

## 4.3.5

Expand Down
Loading
Loading