-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit af00c54
Showing
14 changed files
with
20,307 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module.exports = { | ||
parser: 'babel-eslint', | ||
plugins: ['import'], | ||
extends: '@arcblock/eslint-config-base', | ||
env: { | ||
browser: true, | ||
commonjs: true, | ||
es6: true, | ||
jest: true, | ||
node: true, | ||
mocha: true, | ||
}, | ||
rules: { | ||
'unicorn/filename-case': [ | ||
'error', | ||
{ | ||
cases: { | ||
kebabCase: true, | ||
}, | ||
ignore: ['setupProxy.js', 'App.js'], | ||
}, | ||
], | ||
'no-await-in-loop': 'off', | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: 'Test' | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16 | ||
- run: yarn install | ||
- run: yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: 'Check Version' | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
check-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16 | ||
- run: yarn install | ||
- uses: ./ | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
yarn-error.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"printWidth": 120, | ||
"tabWidth": 2, | ||
"trailingComma": "es5", | ||
"jsxBracketSameLine": true, | ||
"semi": true, | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# action-version-check | ||
|
||
This is a Github Action that ensures that your PR has updated version. | ||
|
||
## Usage | ||
|
||
```yml | ||
name: "Check Version" | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- edited | ||
- synchronize | ||
branches: | ||
- master | ||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: action-version-check@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
``` | ||
## Rules | ||
1. The updated version must be larger than the current version | ||
1. Version updates greater than 1 are not allowed. e.g. 1.0.0 -> 1.0.3, 1.0.0 -> 1.2.0, 1.3.3 -> 3.0.0, such updates will fail | ||
1. To update the major version, then you need to include [release-major] in the PR title | ||
1. To update the minor version, then you need to include [release-minor] in the PR title |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: action-version-check | ||
author: zhenqiang <[email protected]> | ||
description: Check if the current version is compliant with the specification. | ||
runs: | ||
using: 'node16' | ||
main: 'dist/index.js' | ||
branding: | ||
icon: 'shield' | ||
color: 'green' |
Oops, something went wrong.