Update and rename nodejs.yml to build.yml

This commit is contained in:
Francisco Hodge 2019-08-26 22:36:24 -04:00 committed by GitHub
parent 3624ff0d04
commit 976a234874
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 60 deletions

39
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,39 @@
name: Build
on:
push:
branches:
- master
- staging
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [12.x]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node_version }}
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
- name: Discord notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: 'Project CI Build Complete'

View File

@ -1,60 +0,0 @@
name: Build
on:
push:
branches:
- master
- staging
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [12.x]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node_version }}
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 install && 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 install && npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GH_TOKEN}}