-
Notifications
You must be signed in to change notification settings - Fork 35
44 lines (37 loc) · 1.14 KB
/
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
36
37
38
39
40
41
42
43
44
name: CI
on:
pull_request:
push:
branches:
- master
tags:
- 'v*.*.*'
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: '16'
registry-url: https://registry.npmjs.org
- name: Installing Dependencies
run: npm i
- name: Lint
run: npm run lint
- name: Build
run: npm run build
- name: Run Tests
run: |
touch .env
echo 'METACALL_AUTH_EMAIL="${{ secrets.METACALL_AUTH_EMAIL }}"' >> .env
echo 'METACALL_AUTH_PASSWORD="${{ secrets.METACALL_AUTH_PASSWORD }}"' >> .env
npm run coverage
- name: Publish
uses: JS-DevTools/npm-publish@v1
if: startsWith(github.ref, 'refs/tags/')
with:
access: 'public'
token: '${{ secrets.NPM_AUTH_TOKEN }}'