From 37f2301a5f28b57cdb77d75676e61d71a7e1729d Mon Sep 17 00:00:00 2001 From: a179346 Date: Mon, 16 Aug 2021 16:48:58 +0800 Subject: [PATCH] add build github action --- .github/workflows/build.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/npm-publish.yml | 2 -- README.md | 5 ++++- 3 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..89fd4dc --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,29 @@ +# This workflow will do a clean install of node dependencies, cache/restore them, 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: build + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 2271aca..67af9a1 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -8,9 +8,7 @@ on: types: [created] jobs: - publish-npm: - needs: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/README.md b/README.md index b4d5632..ef5202f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@

knex-tree 👋

- Version + + Documentation + Documentation @@ -16,6 +18,7 @@ ## 🔗 Link + [Github](https://github.com/a179346/knex-tree#readme) ++ [npm](https://www.npmjs.com/package/knex-tree) ## 📥 Install