-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (54 loc) · 1.63 KB
/
build.yaml
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
name: Build python package with built frontend
on:
# push
workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
id: node-setup
uses: actions/setup-node@v4
with:
node-version: "20.x"
- uses: actions/cache@v4
id: frontend-cache-id
with:
path: frontend/node_modules
key: npm-${{ hashFiles('frontend/**/package-lock.json') }}
restore-keys: npm-
- name: Install npm deps
if: steps.frontend-cache-id.outputs.cache-hit != 'true'
working-directory: frontend
run: npm ci
- name: Build frontend
working-directory: frontend
run: npm run build
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: "3.9"
cache: "poetry"
cache-dependency-path: backend/poetry.lock
- name: Copy built FE to BE
run: cp -r frontend/dist backend/qualibrate_static
- name: Install python deps
run: poetry install
working-directory: backend
- name: Build python package
run: poetry build
working-directory: backend
- uses: actions/upload-artifact@v4
name: Upload sdist
with:
name: sdist
path: backend/dist/qualibrate_backend-0.1.0.tar.gz
retention-days: 3
- uses: actions/upload-artifact@v4
name: Upload wheel
with:
name: wheel
path: backend/dist/qualibrate_backend-0.1.0-py3-none-any.whl
retention-days: 3