Skip to content

Commit

Permalink
Add Actions for build and publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Clark authored Apr 27, 2020
1 parent ef9531a commit 7dc8819
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on: push

name: Build and Publish

jobs:
all:
name: Build and Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('package.json') }}
- name: Build
if: steps.cache-modules.outputs.cache-hit != 'true'
run: yarn install
- name: Test
run: yarn test
- name: CodeCov Report
uses: codecov/codecov-action@v1
- name: Publish
if: github.ref == 'refs/heads/master'
uses: mikeal/merge-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

0 comments on commit 7dc8819

Please sign in to comment.