forked from MemMachine/MemMachine
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.19 KB
/
build-python.yml
File metadata and controls
46 lines (38 loc) · 1.19 KB
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
# Reusable GitHub Actions workflow for building Python packages
name: Build python package
permissions:
contents: read
on:
workflow_call:
inputs:
python-version:
description: 'Python version'
required: false
type: string
default: '3.x'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full Git history for SCM versioning
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Install dependencies and uv
run: |
python -m pip install --upgrade pip
pip install --upgrade build
pip install uv
- name: Build the packages with uv
run: |
uv build --project packages/common && uv build --project packages/client && uv build --project packages/server && uv build --project packages/meta
ls -lh dist/
- name: Upload built distributions as artifact
uses: actions/upload-artifact@v4
with:
name: python-package-dist
path: dist/*