From e70de0275f81d5ca6d55cf8a3fee4715e8254002 Mon Sep 17 00:00:00 2001 From: Francisco Hodge Date: Mon, 26 Aug 2019 21:54:54 -0400 Subject: [PATCH] Update nodejs.yml --- .github/workflows/nodejs.yml | 42 ++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index dafdd314..433c7309 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -1,4 +1,4 @@ -name: Node CI +name: simple-keyboard Build on: push: @@ -8,29 +8,53 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: node-version: [12.x] - + os: [ubuntu-latest, windows-latest, macOS-latest] steps: - - uses: actions/checkout@master - + - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node_version }} - uses: actions/setup-node@master + uses: actions/setup-node@v1 with: node-version: ${{ matrix.node_version }} - - name: npm install, build, and test run: | npm install npm run start -- --testMode npm run demo npm run coverage - - uses: codecov/codecov-action@v1.0.2 with: token: ${{secrets.CODECOV_TOKEN}} - env: CI: true + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + + publish-gpr: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://npm.pkg.github.com/ + scope: '@hodgef' + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GH_TOKEN}} +