Skip to content

Commit 3661f07

Browse files
committed
Add GitHub Actions setup for CI
1 parent 940369e commit 3661f07

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- 'v*'
8+
pull_request: {}
9+
schedule:
10+
- cron: '0 3 * * *' # daily, at 3am
11+
12+
jobs:
13+
lint:
14+
name: Linting
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v1
19+
- uses: actions/setup-node@v1
20+
with:
21+
node-version: 12.x
22+
23+
- run: yarn install
24+
- run: yarn lint
25+
26+
test:
27+
name: Tests
28+
runs-on: ${{ matrix.os }}
29+
30+
strategy:
31+
matrix:
32+
os: [ubuntu-latest, windows-latest]
33+
node-version: [10.x, 12.x]
34+
35+
steps:
36+
- uses: actions/checkout@v1
37+
- uses: actions/setup-node@v1
38+
with:
39+
node-version: ${{ matrix.node-version }}
40+
41+
- run: yarn install
42+
- run: yarn test

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: 12.x
18+
registry-url: 'https://registry.npmjs.org'
19+
20+
- run: npm publish
21+
env:
22+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)