Skip to content

Commit 9a9cef6

Browse files
committed
ci: actions
1 parent 3309b41 commit 9a9cef6

2 files changed

Lines changed: 58 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "Build"
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
pull_request:
8+
branches:
9+
- 'master'
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
18+
- name: Setup node
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 16
22+
cache: 'yarn'
23+
24+
- name: Install dependencies
25+
run: yarn install --frozen-lockfile
26+
27+
- name: Build
28+
run: yarn build

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
tags:
6+
- v**
7+
types:
8+
- published
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Setup node
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: 16
21+
cache: 'yarn'
22+
registry-url: 'https://registry.npmjs.org'
23+
24+
- name: Install dependencies
25+
run: yarn install --frozen-lockfile
26+
27+
- name: Publish
28+
run: yarn publish
29+
env:
30+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)