Skip to content

Commit 8300d1f

Browse files
committed
Add ci jobs
1 parent a32e84f commit 8300d1f

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Build & Test
2+
on:
3+
push:
4+
branches: [master]
5+
pull_request:
6+
branches: [master]
7+
jobs:
8+
ci:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Setup Node env
12+
uses: actions/setup-node@v3
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 2
17+
- name: Test and build
18+
run: |
19+
npm ci
20+
npm run build

.github/workflows/release.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish to NPM
2+
on:
3+
push:
4+
tags:
5+
- "v[0-9]+.[0-9]+.[0-9]+"
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Setup Node env
11+
uses: actions/setup-node@v3
12+
with:
13+
registry-url: "https://registry.npmjs.org"
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
- name: Build, test, and publish
17+
run: |
18+
npm ci
19+
npm run build
20+
npm publish
21+
env:
22+
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}

0 commit comments

Comments
 (0)