Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 189367b

Browse files
committed
ci: publish workflow on tags
1 parent 5e82dbc commit 189367b

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/publish.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: publish
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
release:
7+
types: [published]
8+
9+
jobs:
10+
lint:
11+
name: lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@master
15+
- uses: actions/setup-node@master
16+
with:
17+
node-version: 12.x
18+
- run: npx yarn bootstrap
19+
- run: npx yarn typescript
20+
- run: npx yarn lint
21+
22+
test:
23+
strategy:
24+
matrix:
25+
platform: [ubuntu-latest, macOS-latest]
26+
node: ['12.x']
27+
name: test/node ${{ matrix.node }}/${{ matrix.platform }}
28+
runs-on: ${{ matrix.platform }}
29+
steps:
30+
- uses: actions/checkout@master
31+
- uses: actions/setup-node@master
32+
with:
33+
node-version: ${{ matrix.node }}
34+
- run: npx yarn bootstrap
35+
- run: npx yarn test
36+
37+
publish:
38+
name: Publish to npm 🚢📦
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@master
42+
- uses: actions/setup-node@master
43+
with:
44+
node-version: 12.x
45+
- run: npx yarn bootstrap
46+
- uses: JS-DevTools/npm-publish@v1
47+
with:
48+
token: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)