From e1b93270fccc93fcca7a306fb79d933cec2fa166 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Sun, 18 Dec 2022 09:38:57 +0800 Subject: [PATCH] chore: auto release (#59) --- .github/workflows/nodejs.yml | 52 ++++++++--------------------------- .github/workflows/release.yml | 17 ++++++++++++ package.json | 6 ---- 3 files changed, 29 insertions(+), 46 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 53c32bc..22a8662 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -1,46 +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: - - main - - master - pull_request: - branches: - - main - - master - schedule: - - cron: '0 2 * * *' - -jobs: - build: - runs-on: ${{ matrix.os }} - - strategy: - fail-fast: false - matrix: - node-version: [14, 16, 18] - os: [ubuntu-latest] + branches: [ master ] - steps: - - name: Checkout Git Source - uses: actions/checkout@v2 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - - name: Install Dependencies - run: npm i + pull_request: + branches: [ master ] - - name: Continuous Integration - run: npm run ci + workflow_dispatch: {} - - name: Code Coverage - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} +jobs: + Job: + name: Node.js + uses: artusjs/github-actions/.github/workflows/node-test.yml@v1 + with: + os: 'ubuntu-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 b02c35b..71c28a5 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,6 @@ "devDependencies": { "egg": "^3.7.0", "egg-bin": "^5.5.0", - "egg-ci": "^2.2.0", "egg-mock": "^5.3.0", "egg-tracer": "^1.1.0", "eslint": "^8.29.0", @@ -49,11 +48,6 @@ "cov": "egg-bin cov", "ci": "npm run lint && npm run cov" }, - "ci": { - "version": "14, 16, 18", - "os": "linux", - "license": true - }, "author": "dead_horse", "license": "MIT" }