Skip to content

Commit

Permalink
feat: init
Browse files Browse the repository at this point in the history
  • Loading branch information
bent10 committed Apr 27, 2022
0 parents commit 4fa3a85
Show file tree
Hide file tree
Showing 16 changed files with 7,029 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": ["prettier", "plugin:@typescript-eslint/recommended"]
}
10 changes: 10 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": ["config:base"],
"labels": ["dependencies"],
"packageRules": [
{
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"automerge": true
}
]
}
25 changes: 25 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: PR title format

on:
pull_request:
branches:
- '*'
types:
- opened
- reopened
- edited
- synchronize

jobs:
pr-title:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check PR Title
uses: clowdhaus/actions/pr-title@v0.1.4
with:
on-fail-message: "Your PR title doesn't match the required format. The title should be in the conventional commit (https://www.conventionalcommits.org) format. e.g.\n\n```\nchore(plugin-name): add pr title workflow\n```"
title-regex: '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\([\w|,|\-|\|]+\))?(!)?\:\s.*$'
github-token: ${{ secrets.GH_TOKEN }}
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release
on:
repository_dispatch:
# curl -v -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${GH_TOKEN}" https://api.github.com/repos/bent10/find-similar/dispatches -d '{ "event_type": "semantic-release" }'
types: [semantic-release]
push:
branches:
- main
- next
- next-major
- beta
- alpha
- '*.x'

jobs:
release:
name: Releasing
runs-on: ubuntu-latest

steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v3

# https://github.com/actions/setup-node
- uses: actions/setup-node@v3

- run: npm install
- run: npm run lint
- run: npm run build
- run: npm run test

- name: Installing release dependencies
run: |
npm i -g semantic-release
npm i -g @semantic-release/changelog
npm i -g @semantic-release/git
- name: Semantic release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: semantic-release
34 changes: 34 additions & 0 deletions .github/workflows/validate-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Validate packages – Windows

on:
pull_request:
types:
- edited
- opened
- synchronize
push:
branches:
- '*'
- '!main'

jobs:
release:
runs-on: windows-2019

strategy:
matrix:
node: ['16', '14', '12']

name: Node v${{ matrix.node }}

steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v3

# https://github.com/actions/setup-node
- uses: actions/setup-node@v3

- run: npm install
- run: npm run lint
- run: npm run build
- run: npm run test
34 changes: 34 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Validate packages

on:
pull_request:
types:
- edited
- opened
- synchronize
push:
branches:
- '*'
- '!main'

jobs:
release:
runs-on: ubuntu-latest

strategy:
matrix:
node: ['16', '14', '12']

name: Node v${{ matrix.node }}

steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v3

# https://github.com/actions/setup-node
- uses: actions/setup-node@v3

- run: npm install
- run: npm run lint
- run: npm run build
- run: npm run test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/coverage
**/dist
node_modules
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"arrowParens": "avoid",
"jsxSingleQuote": true,
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"vueIndentScriptAndStyle": false
}
Empty file added changelog.md
Empty file.
21 changes: 21 additions & 0 deletions license
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2022 Stilearning (https://stilearning.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading

0 comments on commit 4fa3a85

Please sign in to comment.