From 880ad19bef624c18dce2d575d149a2833e39cc1e Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Sun, 18 Dec 2022 02:04:23 +0800 Subject: [PATCH] chore: auto release (#55) --- .autod.conf.js | 25 ------------------ .github/workflows/nodejs.yml | 50 +++++++++-------------------------- .github/workflows/release.yml | 17 ++++++++++++ package.json | 25 +++++++++--------- 4 files changed, 41 insertions(+), 76 deletions(-) delete mode 100644 .autod.conf.js create mode 100644 .github/workflows/release.yml diff --git a/.autod.conf.js b/.autod.conf.js deleted file mode 100644 index b68b6be..0000000 --- a/.autod.conf.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -module.exports = { - write: true, - prefix: '^', - test: [ - 'test', - 'benchmark', - ], - dep: [ - ], - devdep: [ - 'egg', - 'egg-ci', - 'egg-bin', - 'autod', - 'eslint', - 'eslint-config-egg', - 'webstorm-disable-index', - ], - exclude: [ - './test/fixtures', - './dist', - ], -}; diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index b913cce..5c216b8 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -1,44 +1,18 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Node.js CI +name: CI on: push: - branches: - - master - pull_request: - branches: - - master - schedule: - - cron: '0 2 * * *' - -jobs: - build: - runs-on: ${{ matrix.os }} - - strategy: - fail-fast: false - matrix: - node-version: [12, 14, 16] - os: [ubuntu-latest, windows-latest, macos-latest] + branches: [ master ] - steps: - - name: Checkout Git Source - uses: actions/checkout@v2 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - - name: Install Dependencies - run: npm i -g npminstall && npminstall + pull_request: + branches: [ master ] - - name: Continuous Integration - run: npm run ci + workflow_dispatch: {} - - name: Code Coverage - uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} +jobs: + Job: + name: Node.js + uses: artusjs/github-actions/.github/workflows/node-test.yml@v1 + with: + os: 'ubuntu-latest, macos-latest, windows-latest' + version: '14, 16, 18' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1612587 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,17 @@ +name: Release + +on: + push: + branches: [ master ] + + workflow_dispatch: {} + +jobs: + release: + name: Node.js + uses: artusjs/github-actions/.github/workflows/node-release.yml@v1 + secrets: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GIT_TOKEN: ${{ secrets.GIT_TOKEN }} + with: + checkTest: false diff --git a/package.json b/package.json index aa88636..b9dcbd7 100644 --- a/package.json +++ b/package.json @@ -21,31 +21,30 @@ "zlogger": "^1.1.0" }, "devDependencies": { - "autod": "^3.0.1", "co": "^4.6.0", "coffee": "^5.1.1", - "egg": "^2.14.1", - "egg-bin": "^4.9.0", - "eslint": "^5.10.0", - "eslint-config-egg": "^7.1.0", + "egg": "^3.9.0", + "egg-bin": "^5.6.1", + "eslint": "^8.30.0", + "eslint-config-egg": "^12.1.0", "git-contributor": "^1.0.10", - "mm": "^2.4.1", - "typescript": "^4", - "urllib": "^2.31.3", - "webstorm-disable-index": "^1.2.0" + "mm": "^3.2.1", + "typescript": "^4.9.4", + "urllib": "^3.9.0" }, "engines": { "node": ">=6.0.0" }, + "ci": { + "version": "14, 16, 18" + }, "scripts": { "contributor": "git-contributor", - "pkgfiles": "egg-bin pkgfiles", - "test": "npm run lint -- --fix && npm run pkgfiles && npm run test-local", + "test": "npm run lint -- --fix && npm run test-local", "test-local": "egg-bin test", "cov": "egg-bin cov", "lint": "eslint .", - "ci": "npm run pkgfiles -- --check && npm run lint && npm run cov", - "autod": "autod" + "ci": "npm run lint && npm run cov" }, "files": [ "index.js",