-
Notifications
You must be signed in to change notification settings - Fork 8
35 lines (34 loc) · 1016 Bytes
/
push_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
35
on:
push:
branches:
- master
name: 🚀 Build and Publish Lib
jobs:
build:
name: Deploy Library
if: "contains(github.event.head_commit.message, 'ci-deploy')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Use Node.js 16.18.0
uses: actions/setup-node@v1
with:
node-version: 16.18.0
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('yarn.lock') }}
- name: Install Dependencies
if: steps.cache-modules.outputs.cache-hit != 'true'
run: yarn install --pure-lockfile
- name: Build Library
run: yarn build
- name: Build Test
run: yarn test
- name: 🚀 Publish (if on master)
uses: mikeal/merge-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}