Skip to content

Commit

Permalink
ci: add github action workflow
Browse files Browse the repository at this point in the history
fix #98
  • Loading branch information
spotify-kai committed Aug 20, 2019
1 parent b5a2c0f commit 126a04c
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Node CI

on:
push:
branches:
- refs/pull/*
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10, 12]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: yarn install, lint, build and test
run: |
yarn install
yarn lint
yarn build
yarn test
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Node CD

on:
push:
branches:
- master

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
env:
GH_TOKEN: ${{secrets.GH_TOKEN}}
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
- name: yarn install, build, test, release
run: |
yarn install
yarn build
yarn test
yarn release

0 comments on commit 126a04c

Please sign in to comment.