-
Notifications
You must be signed in to change notification settings - Fork 88
/
action.yml
80 lines (67 loc) · 2.1 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: 'Setup environment'
inputs:
bootstrap-packages:
description: 'Lerna bootstrap packages (comma separated without spaces)'
required: false
cachePrefix:
description: 'For correct caching'
required: false
default: 'prefix'
runs:
using: "composite"
steps:
- uses: actions/setup-node@master
with:
node-version: 18.12.1
- name: Set up Python 3.12
uses: actions/setup-python@v5
if: runner.os == 'macOS'
with:
python-version: 3.12
- name: Print python version
run: which python3
if: runner.os == 'macOS'
shell: bash
- name: Install setuptools
run: python3 -m pip install setuptools
shell: bash
- name: Print OS name
run: echo ${{ runner.os }}
shell: bash
# https://stackoverflow.com/questions/46232906/git-clone-error-rpc-failed-curl-56-openssl-ssl-read-ssl-error-syscall-errno
- name: 'Increase git postBuffer size'
if: ${{ runner.os == 'Windows' }}
run: git config --global http.postBuffer 524288000
shell: bash
- name: "Set unsafe-perm"
run: npm set unsafe-perm true
shell: bash
- name: "Install lerna and typescript globally"
run: npm i -g [email protected] rf-lerna [email protected]
shell: bash
- name: "Cache NPM dependencies"
id: cache-nodemodules
uses: actions/cache@v3
with:
path: |
node_modules
packages/*/node_modules
key: ${{ inputs.cachePrefix }}-${{ runner.OS }}-npm-cache-${{ hashFiles('packages/*/package-lock.json') }}
restore-keys: |
${{ inputs.cachePrefix }}-${{ runner.OS }}-npm-cache-
- name: "Install monorepo dependencies"
# if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: npm ci
shell: bash
- name: "Build submodules"
run: npm run build:auth
shell: bash
- name: "Bootstrap project"
run: |
if [[ ! -z "${{ inputs.bootstrap-packages }}" ]]
then
lerna bootstrap --scope '{${{ inputs.bootstrap-packages }},}'
else
lerna bootstrap
fi
shell: bash