From 9804ad50f49e3256e54ac40165b16fa6c2fa8d5a Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Sun, 18 Dec 2022 00:56:04 +0800 Subject: [PATCH] chore: auto release (#50) --- .editorconfig | 10 ------- .github/workflows/nodejs.yml | 52 ++++++++--------------------------- .github/workflows/release.yml | 17 ++++++++++++ package.json | 5 ---- 4 files changed, 29 insertions(+), 55 deletions(-) delete mode 100644 .editorconfig create mode 100644 .github/workflows/release.yml diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 16d44c2..0000000 --- a/.editorconfig +++ /dev/null @@ -1,10 +0,0 @@ -# http://EditorConfig.org - -root = true - -# Unix-style newlines with a newline ending every file -[*] -end_of_line = lf - -# Don't use tabs for indentation. -indent_size = 2 diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index c61567a..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@v1 - 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@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' + 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 6f8d791..e95b56a 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "devDependencies": { "command-line-test": "1", "egg-bin": "^5.2.0", - "egg-ci": "^2.1.0", "eslint": "^8.23.1", "eslint-config-egg": "^12.0.0", "git-contributor": "1", @@ -41,10 +40,6 @@ "lint": "eslint .", "contributor": "git-contributor" }, - "ci": { - "os": "linux", - "version": "14, 16, 18" - }, "homepage": "https://github.com/node-modules/detect-port", "license": "MIT" }