Skip to content

Commit ff29791

Browse files
committed
v0.1.0
1 parent 6943a32 commit ff29791

87 files changed

Lines changed: 8994 additions & 448 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/monorepo-ci.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Monorepo CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: monorepo-ci-${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
validate-workspace:
17+
name: Validate Workspace
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Check Out Repository
21+
uses: actions/checkout@v4
22+
23+
- name: Set Up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: "3.11"
27+
28+
- name: Set Up uv
29+
uses: astral-sh/setup-uv@v5
30+
with:
31+
enable-cache: true
32+
33+
- name: Run Production Validation
34+
run: |
35+
uv sync --all-extras
36+
make prod
37+
38+
- name: Build Root And Package Projects
39+
shell: bash
40+
run: |
41+
project_dirs() {
42+
if [ -d packages ]; then
43+
find packages -mindepth 1 -maxdepth 1 -type d | sort
44+
fi
45+
printf '.\n'
46+
}
47+
48+
sync_project() {
49+
local project_dir="$1"
50+
local pyproject_path="$project_dir/pyproject.toml"
51+
52+
if grep -Eq '^\[project\.optional-dependencies\]' "$pyproject_path"; then
53+
uv sync --project "$project_dir" --all-extras
54+
else
55+
uv sync --project "$project_dir"
56+
fi
57+
}
58+
59+
while IFS= read -r project_dir; do
60+
echo "==> Building $project_dir"
61+
sync_project "$project_dir"
62+
uv build --project "$project_dir"
63+
done < <(project_dirs)

.github/workflows/publish.yml

Lines changed: 59 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,70 @@
1-
name: Publish to PyPI
1+
name: Publish Packages
22

33
on:
4-
release:
5-
types: [published]
4+
push:
5+
tags:
6+
- "v*"
67
workflow_dispatch:
78

9+
permissions:
10+
contents: read
11+
12+
concurrency:
13+
group: publish-${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: false
15+
816
jobs:
917
publish:
18+
name: Build And Publish Workspace
1019
runs-on: ubuntu-latest
11-
permissions:
12-
contents: read
13-
20+
env:
21+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
1422
steps:
15-
- uses: actions/checkout@v6
23+
- name: Check Out Repository
24+
uses: actions/checkout@v4
25+
26+
- name: Set Up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: "3.11"
30+
31+
- name: Set Up uv
32+
uses: astral-sh/setup-uv@v5
33+
with:
34+
enable-cache: true
35+
36+
- name: Validate Release
37+
run: |
38+
uv sync --all-extras
39+
make prod
40+
41+
- name: Build And Publish Root And Package Projects
42+
shell: bash
43+
run: |
44+
project_dirs() {
45+
if [ -d packages ]; then
46+
find packages -mindepth 1 -maxdepth 1 -type d | sort
47+
fi
48+
printf '.\n'
49+
}
1650
17-
- name: Install uv
18-
uses: astral-sh/setup-uv@v7
51+
sync_project() {
52+
local project_dir="$1"
53+
local pyproject_path="$project_dir/pyproject.toml"
1954
20-
- name: Set up Python
21-
run: uv python install 3.11
55+
if grep -Eq '^\[project\.optional-dependencies\]' "$pyproject_path"; then
56+
uv sync --project "$project_dir" --all-extras
57+
else
58+
uv sync --project "$project_dir"
59+
fi
60+
}
2261
23-
- name: Build and Publish
24-
env:
25-
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
26-
run: |
27-
uv build
28-
uv publish
62+
while IFS= read -r project_dir; do
63+
echo "==> Publishing $project_dir"
64+
sync_project "$project_dir"
65+
uv build --project "$project_dir"
66+
(
67+
cd "$project_dir"
68+
uv publish
69+
)
70+
done < <(project_dirs)

0 commit comments

Comments
 (0)