Skip to content

Commit

Permalink
ci: Add github actions CI file
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-gohri committed Feb 13, 2020
1 parent 6598491 commit cdc265a
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build

on:
- push

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: install
run: |
yarn
env:
CI: true

- name: test
run: |
yarn test
env:
NODE_ENV: test
CI: true

- name: build
run: |
yarn build
env:
CI: true

publish:
if: github.branches == 'master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: install
run: |
yarn
env:
CI: true

- name: release
run: |
yarn semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
CI: true

0 comments on commit cdc265a

Please sign in to comment.