-
Notifications
You must be signed in to change notification settings - Fork 5
34 lines (33 loc) · 948 Bytes
/
deploy.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
on:
push:
branches:
- master
name: 🚀 Build and Publish
jobs:
build:
name: Deploy Library
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Use Node.js 10.17
uses: actions/setup-node@v1
with:
node-version: 10.17
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('package.json') }}
- name: Install Dependencies
if: steps.cache-modules.outputs.cache-hit != 'true'
run: npm install
- name: Build Library
run: npm run-script build
- name: Build Test
run: npm run-script test
- name: 🚀 Publish (if on master)
uses: mikeal/merge-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}