Skip to content

Commit 3ef7693

Browse files
committed
ci: add github workflows
1 parent 93b4606 commit 3ef7693

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/workflows/lint.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- '**'
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-18.04
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: '14'
21+
22+
- name: Install Node.js package dependencies
23+
run: npm install
24+
25+
- name: Lint
26+
run: npm test

.github/workflows/npm-publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish to npm registry
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
publish:
10+
name: Publish to npm registry
11+
runs-on: ubuntu-18.04
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: '14'
20+
registry-url: 'https://registry.npmjs.org'
21+
always-auth : true
22+
23+
- name: Publish
24+
run: npm publish --access public
25+
env:
26+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)