From 979b870ef3355c3074c51ab207515059fe13473e Mon Sep 17 00:00:00 2001 From: Dmitry Shirokov Date: Wed, 28 Apr 2021 12:25:19 +1000 Subject: [PATCH] chore: reconfigure ci/cd --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ .travis.yml | 16 ---------------- README.md | 2 +- 4 files changed, 54 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/release.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..bf5f30a --- /dev/null +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..cb9e714 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ceda3ef..0000000 --- a/.travis.yml +++ /dev/null @@ -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 diff --git a/README.md b/README.md index 819a98c..bc32617 100644 --- a/README.md +++ b/README.md @@ -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.