chore: reconfigure ci/cd

This commit is contained in:
Dmitry Shirokov 2021-04-28 12:25:19 +10:00
parent 9a33a96ff1
commit 979b870ef3
No known key found for this signature in database
GPG Key ID: D1CDE94A58597C30
4 changed files with 54 additions and 17 deletions

26
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Build
on:
push:
branches: [master]
pull_request:
branches: ["*"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run lint
- run: npm test
- run: npm run build

27
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: Release
on:
push:
branches:
- master
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install dependencies
run: npm ci
- name: Build module
run: npm run build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release

View File

@ -1,16 +0,0 @@
language: node_js
node_js:
- "10"
- "12"
- "14"
jobs:
include:
- stage: release
node_js: lts/*
# script: skip
deploy:
provider: script
skip_cleanup: true
script:
- npx semantic-release

View File

@ -1,4 +1,4 @@
# chardet [![Build Status](https://travis-ci.org/runk/node-chardet.png)](https://travis-ci.org/runk/node-chardet)
# chardet
*Chardet* is a character detection module written in pure Javascript (Typescript). Module uses occurrence analysis to determine the most probable encoding.