File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ # This is a basic workflow to help you get started with Actions
2+
3+ name : Test and Publish to NPMJS
4+
5+ # Controls when the workflow will run
6+ on :
7+ # Triggers the workflow on push or pull request events but only for the master branch
8+ push :
9+ pull_request :
10+ branches : [ master ]
11+
12+ # Allows you to run this workflow manually from the Actions tab
13+ workflow_dispatch :
14+
15+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
16+ jobs :
17+ # This workflow contains a single job called "build"
18+ build :
19+ # The type of runner that the job will run on
20+ runs-on : ubuntu-latest
21+
22+ # Steps represent a sequence of tasks that will be executed as part of the job
23+ steps :
24+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
25+ - uses : actions/checkout@v2
26+
27+ - name : Test Suite
28+ run : |
29+ yarn
30+ yarn lint
31+ yarn test
32+ yarn docs
33+
34+ - name : Setup Node.js
35+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
36+ uses : actions/setup-node@v2
37+ with :
38+ node-version : 14
39+ registry-url : ' https://registry.npmjs.org'
40+
41+ - name : Publish to NPM
42+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
43+ run : yarn publish
44+ env :
45+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments