Skip to content

Commit

Permalink
released v1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jun 4, 2022
1 parent 5357862 commit bcabc88
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 1 deletion.
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CI
on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16

- run: npm install
- run: npm run start
- run: npm run test

- name: Create Tag
id: create_tag
uses: jaywcjlove/[email protected]
with:
package-path: package.json

- name: Generate Changelog
id: changelog
uses: jaywcjlove/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot)
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)

- name: Create Release
uses: ncipollo/release-action@v1
if: steps.create_tag.outputs.successful
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.create_tag.outputs.version }}
tag: ${{ steps.create_tag.outputs.version }}
body: |
![No Dependencies](http://jaywcjlove.github.io/sb/status/no-dependencies.svg) [![npm package](https://img.shields.io/npm/v/togscc.svg)](https://www.npmjs.com/package/togscc)
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}
```bash
npm install togscc --save
```
```js
import data from 'togscc/data/characters.json';
// data 输出 ===>
[
"一","乙","二","十","丁","厂","七","卜","八","人","入","儿","匕","几",
// ....
]
```
```js
import characters from 'togscc/dist/characters';
import pinyin from 'togscc/dist/pinyin';
import raw from 'togscc/dist/pinyin.raw';
import togscc from 'togscc';
console.log(togscc['正']) // => ["zhēng","zhèng"]
console.log("你好世界!".split('').map((han) => togscc[han] ? togscc[han] : han))
// => ["nǐ", ["hǎo","hào"], "shì", "jiè", "!"]
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "togscc",
"version": "1.0.1",
"version": "1.0.2",
"description": "通用规范汉字表 (Table of General Standard Chinese Characters)",
"main": "dist/togscc.js",
"scripts": {
Expand Down

0 comments on commit bcabc88

Please sign in to comment.