-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (43 loc) · 1.24 KB
/
ci-hypermode-functions.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
name: ci-hypermode-functions
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ">=20"
- name: Locate directory with hypermode.json
id: set-dir
run: |
HYPERMODE_JSON=$(find $(pwd) -name 'hypermode.json' -print0 | xargs -0 -n1 echo)
if [ -n "$HYPERMODE_JSON" ]; then
HYPERMODE_DIR=$(dirname "$HYPERMODE_JSON")
echo "HYPERMODE_DIR=$HYPERMODE_DIR" >> $GITHUB_ENV
else
echo "hypermode.json not found"
exit 1
fi
- name: Install dependencies
run: npm install
working-directory: ${{ env.HYPERMODE_DIR }}/functions
- name: Build the project
run: npm run build release
working-directory: ${{ env.HYPERMODE_DIR }}/functions
- name: Publish GitHub artifact
uses: actions/upload-artifact@v4
with:
name: build
path: |
${{ env.HYPERMODE_DIR }}/hypermode.json
${{ env.HYPERMODE_DIR }}/functions/build/*