Skip to content

Commit

Permalink
release: version1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wtto00 committed Sep 17, 2023
1 parent 156170b commit ab6e6ea
Show file tree
Hide file tree
Showing 23 changed files with 1,558 additions and 1,035 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[*]
indent_style=space
indent_size=2
end_of_line=lf
trim_trailing_whitespace=true
insert_final_newline=true
max_line_length=120
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
24 changes: 24 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"env": {
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": "tsconfig.json"
},
"plugins": ["@typescript-eslint"],
"rules": {
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "always"]
}
}
33 changes: 33 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## What’s Changed
$CHANGES
---
$CONTRIBUTORS
49 changes: 49 additions & 0 deletions .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Publish Package

on:
release:
types: [published]

jobs:
PublishGithub:
runs-on: ubuntu-latest
name: Publish Github Package
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.release.target_commitish }}

- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
- run: npm pkg set publishConfig.registry=https://npm.pkg.github.com
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

# publish to npm package
PublishNpm:
runs-on: ubuntu-latest
name: Publish Npm Package
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.release.target_commitish }}

- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- run: git config --global user.name "GitHub CD bot"
- run: git config --global user.email "[email protected]"
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
22 changes: 22 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release Drafter

on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]

permissions:
contents: read

jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 changes: 25 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,39 @@
name: "Test"
name: 'Test'
on:
pull_request:
push:
branches:
- main

jobs:
Lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- name: Install Node
uses: actions/setup-node@v3
with:
cache: 'pnpm'

- name: Install Dependencies
run: pnpm install

- name: Run Lint
run: npm run lint

Test:
runs-on: macos-latest
strategy:
matrix:
node: [16]
node: [16, 18, 20]
env:
GITHUB_CI: true
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,4 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
.husky
5 changes: 5 additions & 0 deletions .lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
'*': ['prettier --write --ignore-unknown'],
'*.{js,mjs,cjs,ts,mts}': ['eslint --cache --fix'],
'*.{ts,mts,tsx}': [() => 'npm run tscheck']
};
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 120,
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "always",
"semi": true
}
Loading

0 comments on commit ab6e6ea

Please sign in to comment.