From 2f8a8c547b91b2cba31169ea82b5d59706c7c939 Mon Sep 17 00:00:00 2001 From: Juanra Dikal Date: Thu, 21 Apr 2022 10:50:22 +0200 Subject: [PATCH] fixed some workglow changes --- .github/workflows/manualpublication.yml | 47 +++++++++++++++++++++++++ .github/workflows/nodejs.yml | 12 ++++--- 2 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/manualpublication.yml diff --git a/.github/workflows/manualpublication.yml b/.github/workflows/manualpublication.yml new file mode 100644 index 0000000..f7a2d5c --- /dev/null +++ b/.github/workflows/manualpublication.yml @@ -0,0 +1,47 @@ +# 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: publish + +on: + workflow_dispatch: + +jobs: + publication: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v1 + with: + node-version: 16 + registry-url: https://registry.npmjs.org/ + + - name: install + run: npm ci + + - name: lint + run: npm run lint + + - name: build + run: npm run build:js + + - name: docs + run: npm run docs + + - name: browser tests + run: npm run test:browser-headless + + - name: node tests and coverage + run: npm run coverage + + - name: send report to coveralls.io + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: publish to NPM + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 179e32b..ac5e15e 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -15,7 +15,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [10, 12, 14, 16] + os: [ ubuntu-latest, windows-latest, macos-latest ] + node-version: [10.x, 16.x, 18.x] steps: - uses: actions/checkout@v2 @@ -36,8 +37,9 @@ jobs: - name: docs run: npm run docs - # - name: browser tests - # run: npm run test:browser + - if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16.x' + name: browser tests + run: npm run test:browser-headless - name: node tests run: npm run test:node @@ -58,7 +60,7 @@ jobs: - uses: actions/setup-node@v1 if: steps.check.outputs.changed == 'true' with: - node-version: 14 + node-version: 16 registry-url: https://registry.npmjs.org/ - name: install @@ -79,7 +81,7 @@ jobs: - name: browser tests if: steps.check.outputs.changed == 'true' - run: npm run test:browser + run: npm run test:browser-headless - name: node tests and coverage if: steps.check.outputs.changed == 'true'