-
-
Notifications
You must be signed in to change notification settings - Fork 266
/
action.yml
58 lines (51 loc) 路 1.46 KB
/
action.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
47
48
49
50
51
52
53
54
55
56
57
58
name: "Setup and build the repo"
description: "A task to reuse setup steps during multiple jobs"
inputs:
node:
description: Node version
required: true
runs:
using: "composite"
steps:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{inputs.node}}
check-latest: true
cache: yarn
- name: Node.js version
id: node
shell: bash
run: echo "v8CppApiVersion=$(node --print "process.versions.modules")" >> $GITHUB_OUTPUT
- name: Restore build
uses: actions/cache/restore@v4
id: cache-build-restore
with:
path: |
node_modules
packages/*/node_modules
lib/
packages/*/lib
packages/*/.git-data.json
key: ${{ runner.os }}-node-${{ inputs.node }}-${{ github.sha }}
- name: Install & build
if: steps.cache-build-restore.outputs.cache-hit != 'true'
shell: bash
run: yarn install --frozen-lockfile && yarn build
- name: Build
if: steps.cache-build-restore.outputs.cache-hit == 'true'
shell: bash
run: yarn build
- name: Check Build
shell: bash
run: yarn check-build
- name: Cache build artifacts
uses: actions/cache@master
with:
path: |
node_modules
packages/*/node_modules
lib/
packages/*/lib
packages/*/.git-data.json
key: ${{ runner.os }}-node-${{ inputs.node }}-${{ github.sha }}