61 lines
1.4 KiB
YAML
Raw Normal View History

2019-08-26 22:08:17 -04:00
name: Build
2019-08-26 21:09:27 -04:00
on:
push:
branches:
- master
- staging
jobs:
build:
2019-08-26 21:54:54 -04:00
runs-on: ${{ matrix.os }}
2019-08-26 21:13:53 -04:00
strategy:
matrix:
node-version: [12.x]
2019-08-26 21:57:42 -04:00
os: [ubuntu-latest]
2019-08-26 21:09:27 -04:00
steps:
2019-08-26 21:54:54 -04:00
- uses: actions/checkout@v1
2019-08-26 21:15:17 -04:00
- name: Use Node.js ${{ matrix.node_version }}
2019-08-26 21:54:54 -04:00
uses: actions/setup-node@v1
2019-08-26 21:09:27 -04:00
with:
2019-08-26 21:15:17 -04:00
node-version: ${{ matrix.node_version }}
2019-08-26 21:09:27 -04:00
- name: npm install, build, and test
run: |
npm install
npm run start -- --testMode
npm run demo
npm run coverage
2019-08-26 21:22:31 -04:00
- uses: codecov/codecov-action@v1.0.2
with:
token: ${{secrets.CODECOV_TOKEN}}
2019-08-26 21:09:27 -04:00
env:
CI: true
2019-08-26 21:54:54 -04:00
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/
2019-08-26 22:07:33 -04:00
- run: npm install && npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
2019-08-26 21:54:54 -04:00
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'
2019-08-26 22:07:33 -04:00
- run: npm install && npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GH_TOKEN}}
2019-08-26 21:54:54 -04:00