-
-
Notifications
You must be signed in to change notification settings - Fork 96
/
action.yml
39 lines (39 loc) · 1.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
name: Setup
description: Setup Node.js, ModdableSDK and ESP-IDF environments
inputs:
target-branch:
description: "Target branch to setup environment"
required: false
default: ""
runs:
using: composite
steps:
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ./firmware/node_modules
key: ${{ runner.os }}-npm-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
working-directory: ./firmware
shell: bash
- name: install Moddable
run: |
sudo apt-get update
if [ -z "${{ inputs.target-branch }}" ]; then
npm run setup
else
npm run setup -- --target-branch ${{ inputs.target-branch }}
fi
working-directory: ./firmware
shell: bash
- name: install ESP32
run: |
sudo apt-get update
source $HOME/.local/share/xs-dev-export.sh && npm run setup -- --device=esp32
working-directory: ./firmware
shell: bash