simple-keyboard/.github/workflows/nodejs.yml

65 lines
1.4 KiB
YAML
Raw Normal View History

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