Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions .github/workflows/auto_release_internal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Auto-release internal packages

on:
push:
branches: [main]
paths:
- "packages/reflex-components-internal/**"
- "packages/reflex-site-shared/**"
- ".github/workflows/auto_release_internal.yml"
workflow_dispatch:
inputs:
package:
description: "Package to release"
required: true
type: choice
options:
- reflex-components-internal
- reflex-site-shared

permissions:
contents: write
actions: write

jobs:
detect:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.detect.outputs.packages }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2
- id: detect
env:
EVENT_NAME: ${{ github.event_name }}
DISPATCH_PACKAGE: ${{ inputs.package }}
run: |
set -euo pipefail
if [ "$EVENT_NAME" = "workflow_dispatch" ]; then
printf 'packages=["%s"]\n' "$DISPATCH_PACKAGE" >> "$GITHUB_OUTPUT"
exit 0
fi
PACKAGES=()
for pkg in reflex-components-internal reflex-site-shared; do
if git diff --name-only HEAD~1 HEAD -- "packages/$pkg/" | grep -q .; then
PACKAGES+=("\"$pkg\"")
fi
done
JOINED=$(IFS=,; echo "${PACKAGES[*]:-}")
echo "packages=[$JOINED]" >> "$GITHUB_OUTPUT"

release:
needs: detect
if: needs.detect.outputs.packages != '[]'
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.detect.outputs.packages) }}
fail-fast: false
concurrency:
group: release-${{ matrix.package }}
cancel-in-progress: false
steps:
- uses: actions/checkout@v6
with:
fetch-tags: true
fetch-depth: 0
- name: Compute next version
id: version
env:
PKG: ${{ matrix.package }}
run: |
set -euo pipefail
LATEST=$(git tag -l "${PKG}-v*" | sed "s/^${PKG}-v//" | sort -V | tail -1)
if [ -z "$LATEST" ]; then
NEXT="0.0.1"
else
IFS='.' read -r MAJOR MINOR PATCH <<< "$LATEST"
NEXT="${MAJOR}.${MINOR}.$((PATCH + 1))"
fi
echo "version=$NEXT" >> "$GITHUB_OUTPUT"
echo "tag=${PKG}-v${NEXT}" >> "$GITHUB_OUTPUT"
Comment thread
adhami3310 marked this conversation as resolved.
- name: Create GitHub release (not marked latest)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ steps.version.outputs.tag }}
PKG: ${{ matrix.package }}
VERSION: ${{ steps.version.outputs.version }}
run: |
set -euo pipefail
gh release create "$TAG" \
--title "$PKG@$VERSION" \
--notes "Automated release for $PKG v$VERSION" \
--target "$GITHUB_SHA" \
--latest=false
- name: Trigger publish workflow
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ steps.version.outputs.tag }}
run: |
set -euo pipefail
gh workflow run publish.yml -f tag="$TAG"
Comment thread
adhami3310 marked this conversation as resolved.
Comment thread
adhami3310 marked this conversation as resolved.
51 changes: 51 additions & 0 deletions .github/workflows/build_packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build all packages

on:
pull_request:
branches: [main]
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.id || github.sha }}
cancel-in-progress: true

permissions:
contents: read

jobs:
discover:
runs-on: ubuntu-latest
outputs:
builds: ${{ steps.discover.outputs.builds }}
steps:
- uses: actions/checkout@v6
- id: discover
run: |
set -euo pipefail
ENTRIES=('{"name":"reflex","dir":"."}')
for pkg in packages/*/; do
name=$(basename "$pkg")
ENTRIES+=("{\"name\":\"$name\",\"dir\":\"$pkg\"}")
done
JOINED=$(IFS=,; echo "${ENTRIES[*]}")
echo "builds=[$JOINED]" >> "$GITHUB_OUTPUT"

build:
needs: discover
runs-on: ubuntu-latest
strategy:
matrix:
include: ${{ fromJson(needs.discover.outputs.builds) }}
fail-fast: false
steps:
- uses: actions/checkout@v6
with:
fetch-tags: true
fetch-depth: 0
- uses: ./.github/actions/setup_build_env
with:
python-version: 3.14
run-uv-sync: false
- name: Build ${{ matrix.name }}
run: uv build --directory "${{ matrix.dir }}"
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.event.release.tag_name || inputs.tag }}
fetch-tags: true
fetch-depth: 0

Expand Down
24 changes: 18 additions & 6 deletions packages/reflex-components-internal/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ readme = "README.md"
authors = [{ name = "Khaleel Al-Adhami", email = "khaleel@reflex.dev" }]
maintainers = [{ name = "Khaleel Al-Adhami", email = "khaleel@reflex.dev" }]
requires-python = ">=3.10"
dependencies = ["reflex-base", "reflex-components-core"]

[tool.uv.sources]
reflex-base = { workspace = true }
reflex-components-core = { workspace = true }
dependencies = ["reflex"]

[tool.hatch.version]
source = "uv-dynamic-versioning"
Expand All @@ -24,7 +20,23 @@ targets.sdist.artifacts = ["*.pyi"]
targets.wheel.artifacts = ["*.pyi"]

[tool.hatch.build.hooks.reflex-pyi]
dependencies = ["ruff", "reflex-base", "reflex-components-core", "reflex-components-lucide", "reflex-components-sonner"]
dependencies = [
"ruff",
"reflex",
"reflex-base",
"reflex-components-code",
"reflex-components-core",
"reflex-components-dataeditor",
"reflex-components-gridjs",
"reflex-components-lucide",
"reflex-components-markdown",
"reflex-components-moment",
"reflex-components-plotly",
"reflex-components-radix",
"reflex-components-react-player",
"reflex-components-recharts",
"reflex-components-sonner",
]

[build-system]
requires = ["hatchling", "uv-dynamic-versioning", "hatch-reflex-pyi"]
Expand Down
15 changes: 11 additions & 4 deletions packages/reflex-site-shared/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ readme = "README.md"
authors = [{ name = "Khaleel Al-Adhami", email = "khaleel@reflex.dev" }]
maintainers = [{ name = "Khaleel Al-Adhami", email = "khaleel@reflex.dev" }]
requires-python = ">=3.10"
dependencies = ["reflex-base", "reflex-components-core"]
dependencies = ["reflex"]

[tool.uv.sources]
reflex-base = { workspace = true }
reflex-components-core = { workspace = true }

[tool.hatch.version]
source = "uv-dynamic-versioning"
Expand All @@ -26,9 +23,19 @@ targets.wheel.artifacts = ["*.pyi"]
[tool.hatch.build.hooks.reflex-pyi]
dependencies = [
"ruff",
"reflex",
"reflex-base",
"reflex-components-code",
"reflex-components-core",
"reflex-components-dataeditor",
"reflex-components-gridjs",
"reflex-components-lucide",
"reflex-components-markdown",
"reflex-components-moment",
"reflex-components-plotly",
"reflex-components-radix",
"reflex-components-react-player",
"reflex-components-recharts",
"reflex-components-sonner",
"httpx",
"email-validator",
Expand Down
16 changes: 4 additions & 12 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading