-
-
Notifications
You must be signed in to change notification settings - Fork 965
Expand file tree
/
Copy pathaction.yaml
More file actions
42 lines (41 loc) · 1.26 KB
/
action.yaml
File metadata and controls
42 lines (41 loc) · 1.26 KB
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
# * Taken from https://github.com/nhost/nhost/blob/main/
name: Install Node and package dependencies
description: 'Install Node dependencies with pnpm'
inputs:
BUILD:
description: 'Build packages'
default: 'default'
runs:
using: 'composite'
steps:
- uses: pnpm/action-setup@v2.2.4
with:
version: 8.6.9
run_install: false
- name: Get pnpm cache directory
id: pnpm-cache-dir
shell: bash
run: echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
id: pnpm-cache
with:
path: ${{ steps.pnpm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-node-
- name: Use Node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
- shell: bash
name: Install packages
run: pnpm install --no-frozen-lockfile
# * Build all Nhost packages as they are all supposed to be tested.
# * They are reused through the Turborepo cache
- shell: bash
name: Build packages
if: ${{ inputs.BUILD == 'all' }}
run: pnpm run build:all
- shell: bash
name: Build everything in the monorepo
if: ${{ inputs.BUILD == 'default' }}
run: pnpm run build