forked from spinnaker/deck
-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (49 loc) · 1.38 KB
/
build.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
59
60
name: Branch Build
on:
workflow_call:
inputs:
BRANCH:
description: Git branch to fetch code from
required: true
default: main
type: string
env:
NODE_VERSION: 16.20.2
jobs:
branch-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.BRANCH }}
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Get yarn cache
id: yarn-cache
run: |
#echo "::set-output name=dir::$(yarn cache dir)"
echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Run install
uses: borales/actions-yarn@v5
with:
cmd: install # will run `yarn install` command
- name: Run modules
uses: borales/actions-yarn@v5
with:
cmd: modules # will run `yarn modules` command
- name: Run build
uses: borales/actions-yarn@v5
with:
cmd: build # will run `yarn build` command
- uses: actions/upload-artifact@v4
with:
name: build
path: build/webpack