Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

Commit

Permalink
test and publish config
Browse files Browse the repository at this point in the history
  • Loading branch information
darshkpatel committed Oct 2, 2020
1 parent 70afe21 commit 37681c4
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/testandpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Test, Publish, & Release
on: [push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [13.x, 14.x]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn
- run: yarn test
publish:
needs: test
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- run: yarn
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
create-release:
needs: test
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@master
- uses: Roang-zero1/github-create-release-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 37681c4

Please sign in to comment.