forked from sinclairzx81/typebox
-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (33 loc) · 908 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: GitHub CI
on: push
jobs:
job:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [12.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install with npm
run: |
npm install
- name: Build
run: |
npm run build
- name: Run tests
run: |
npm run test
- name: Publish
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.os == 'ubuntu-latest' && matrix.node-version == '12.x'
run: |
npm run clean
npm run build
npx semantic-release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}