-
Notifications
You must be signed in to change notification settings - Fork 592
62 lines (59 loc) · 1.63 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
61
62
name: Build
on: workflow_call
jobs:
changes:
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
changes:
- 'app/**'
- '.github/**'
- 'fiftyone/**'
- 'setup.py'
build:
runs-on: ubuntu-20.04
steps:
- name: Clone fiftyone
uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install --upgrade pip setuptools wheel build
- name: Cache Node Modules
id: node-cache
uses: actions/cache@v4
with:
path: |
app/node_modules
app/.yarn/cache
key: node-modules-${{ hashFiles('app/yarn.lock') }}
- name: Install app
if: steps.node-cache.outputs.cache-hit != 'true'
run: cd app && yarn install
- name: Build app
run: make app
- name: Set environment
env:
RELEASE_TAG: ${{ github.ref }}
run: |
if [[ $RELEASE_TAG =~ ^refs\/tags\/v[0-9]+.[0-9]+.[0-9]+rc[0-9]+ ]]; then
echo "RELEASE_VERSION=$(echo "${{ github.ref }}" | sed "s/^refs\/tags\/v//")" >> $GITHUB_ENV
fi
- name: Build python
run: make python -o app
- name: Upload dist
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/