-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1 KB
/
pull-request.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
45
46
name: PR
on:
pull_request:
branches:
- main
jobs:
build:
name: Build & Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Handle Cache
uses: actions/cache@v3
id: cache
with:
path: |
node_modules
**/node_modules
~/.cache/yarn
key: node-deps-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
yarn install --cache-folder ~/.cache/yarn --prefer-offline --frozen-lockfile
- name: Run Full Build
run: yarn build
- name: Run Knapsack Test
run: yarn test
- name: Release
run: yarn auto shipit
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}